Tag Archives: Stopwatch class

Use the Stopwatch class to time a program in C#

To measure elapsed time, you can save the current time with DateTime.Now and then compare it to a later time to see how much time has elapsed. The Stopwatch class in the System.Diagnostics namespace makes this a bit easier. It’s … Continue reading

Posted in performance | Tagged , , , , , , , , , | Leave a comment