Skip to content

Instantly share code, notes, and snippets.

@SpacePurr
Last active January 28, 2020 11:24
Show Gist options
  • Save SpacePurr/83f26322291eba11322437169dbd0766 to your computer and use it in GitHub Desktop.
Save SpacePurr/83f26322291eba11322437169dbd0766 to your computer and use it in GitHub Desktop.
Stopwatch
var startTime = System.Diagnostics.Stopwatch.StartNew();
//Выполняемый код
startTime.Stop();
var resultTime = startTime.Elapsed;
var elapsedTime = $"{resultTime.Hours:00}:{resultTime.Minutes:00}:{resultTime.Seconds:00}.{resultTime.Milliseconds:000}";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment