Accurately measure elapsed wall clock time in .NET?

System.Diagnostics. Stopwatch is your best bet. However, the exact accuracy will depend on the hardware on the computer you're using, i.e.

Whether a high-resolution performance counter is available. (You can check that with the Is).

System.Diagnostics. Stopwatch is your best bet. However, the exact accuracy will depend on the hardware on the computer you're using, i.e.

Whether a high-resolution performance counter is available. (You can check that with the Is) Sample use: Stopwatch sw = Stopwatch.StartNew(); // Do stuff here sw.Stop(); TimeSpan time = sw. Elapsed; Note that if you use the ElapsedTicks property, that's measured in timer ticks which is not the same as the ticks used in DateTime and TimeSpan.

That's caught me out before now - which is why I always use ElapsedMilliseconds or the Elapsed property.

This looks perfect. On my system the Frequency field claims a resolution of better than one tenth of a microsecond. – pauldoo Sep 24 '10 at 9:20.

Have a look at Stopwatch Class and Stopwatch. Frequency Field.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions