public class TimecodeOnGUI : MonoBehaviour
private float elapsedTime;
private GUIStyle guiStyle;
guiStyle = new GUIStyle();
guiStyle.normal.textColor = Color.white;
elapsedTime += Time.deltaTime;
int minutes = Mathf.FloorToInt(elapsedTime / 60f);
int seconds = Mathf.FloorToInt(elapsedTime % 60f);
int milliseconds = Mathf.FloorToInt((elapsedTime * 1000f) % 1000f);
string timecode = string.Format("{0:00}:{1:00}:{2:000}", minutes, seconds, milliseconds);
GUI.Label(new Rect(10, 10, 200, 40), timecode, guiStyle);