A Stopwatch instance can measure elapsed time over several intervals with the total elapsed time being all individual intervals added together. This gives a reliable method of measuring elapsed time between two or more events.
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
double d =...
The IsHighResolution property indicates whether the timer is based on a high-resolution performance counter or based on the DateTime class.
This field is read-only.
// Display the timer frequency and resolution.
if (Stopwatch.IsHighResolution)
{
Console.WriteLine("Operations timed ...