What does ElapsedTicks and Elapsed.Ticks in the Stopwatch class mean? When could the meaning be different than intended?
ElapsedTicks
Elapsed.Ticks
I just found out that ElapsedTicks in the Stopwatch class doesn't mean real "ticks" if StopWatch.IsHighResolution is true.
Stopwatch
StopWatch.IsHighResolution
true
Note (if IsHighResolution is True - from Microsoft Connect link (now dead)):
IsHighResolution
Stopwatch ticks are different from DateTime.Ticks. Each tick in the DateTime.Ticks value represents one 100-nanosecond interval. Each tick in the ElapsedTicks value represents the time interval equal to 1 second divided by the Frequency.
You can do the math above or it seem you can use StopWatch.Elapsed.Ticks instead of StopWatch.ElapsedTicks.
StopWatch.Elapsed.Ticks
StopWatch.ElapsedTicks
2.1m questions
2.1m answers
60 comments
57.0k users