Created
August 3, 2015 17:09
-
-
Save unitycoder/b7b451cf05dded78eb76 to your computer and use it in GitHub Desktop.
Timer with ms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update () { | |
Debug.Log(FormatTime(Time.time)); | |
} | |
string FormatTime(float t) | |
{ | |
var time = System.TimeSpan.FromSeconds(t); | |
return string.Format("{0:D2}:{1:D2}:{2:D3}", time.Minutes, time.Seconds, time.Milliseconds); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using stopwatch
https://gist.github.com/unitycoder/c609a99fc3f14b3553ed