Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Last active February 12, 2023 12:49
Show Gist options
  • Save unitycoder/c609a99fc3f14b3553ed to your computer and use it in GitHub Desktop.
Save unitycoder/c609a99fc3f14b3553ed to your computer and use it in GitHub Desktop.
Measure time with Stopwatch Timer
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();
@unitycoder
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment