Skip to content

Instantly share code, notes, and snippets.

@JT5D
Forked from unitycoder/Stopwatch.cs
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save JT5D/b4c00dfe8779b9fd396f to your computer and use it in GitHub Desktop.

Select an option

Save JT5D/b4c00dfe8779b9fd396f to your computer and use it in GitHub Desktop.
var stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start();
// your function here..
stopwatch.Stop();
//Debug.Log("Timer: " + stopwatch.Elapsed);
Debug.Log("Timer: " + stopwatch.ElapsedMilliseconds);
stopwatch.Reset();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment