Here's sample:
Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); // action I want to measure stopwatch.Stop();
Or just
Stopwatch stopwatch = Stopwatch.StartNew(); // action I want to measure stopwatch.Stop();
It's more precise than using DateTime.
No comments:
Post a Comment