private void Update() { float timeRemaining = timeTracker.GetTimeRemaining(); if (timeRemaining != Mathf.Infinity) { TimeSpan timeSpan = TimeSpan.FromSeconds(timeRemaining); timeText.text = String.Format("{0:0}:{1:00}:{2:D2}", timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds / 10); } else { timeText.text = ""; } }