N
nickdu
I've got a simple console app which I've written which makes use of the
Stopwatch class to do some measurements. Surprisingly, to me at least, some
of the Stopwatch.ElapsedTicks are negative. IsHighResolution is true and the
Frequency is 2,612,080,000. The entire application runs in a little over a
minute. Why would any of the elapsed times I'm measuring come out negative?
I searched around and found some examples of this, but the reason given was
arithmetic overflow. Even if I measured the elapsed time of the entire run
of the application is would only be roughly 60 * 2,612,080,000 ticks which
I'm pretty sure should fit in a long without going negative. Can someone
shed some light on this?
--
Thanks,
Nick
(e-mail address removed)
remove "nospam" change community. to msn.com
Stopwatch class to do some measurements. Surprisingly, to me at least, some
of the Stopwatch.ElapsedTicks are negative. IsHighResolution is true and the
Frequency is 2,612,080,000. The entire application runs in a little over a
minute. Why would any of the elapsed times I'm measuring come out negative?
I searched around and found some examples of this, but the reason given was
arithmetic overflow. Even if I measured the elapsed time of the entire run
of the application is would only be roughly 60 * 2,612,080,000 ticks which
I'm pretty sure should fit in a long without going negative. Can someone
shed some light on this?
--
Thanks,
Nick
(e-mail address removed)
remove "nospam" change community. to msn.com