2 Answers
2

Summary: The Frequency of the stopwatch can be different on different hardware which means the ticks (whose interval is based on frequency) are of a different size (and of a different size to the tick in the timespan and datetime objects).

This property represents the number of elapsed ticks in the underlying
timer mechanism. A tick is the smallest unit of time that the
Stopwatch timer can measure. Use the Frequency field to convert the
ElapsedTicks value into a number of seconds.

And from the page on the Frequency field:

The timer frequency indicates the timer precision and resolution. For
example, a timer frequency of 2 million ticks per second equals a
timer resolution of 500 nanoseconds per tick. In other words, because
one second equals 1 billion nanoseconds, a timer frequency of 2
million ticks per second is equivalent to 2 million ticks per 1
billion nanoseconds, which can be further simplified to 1 tick per 500
nanoseconds.

The Frequency value depends on the resolution of the underlying timing
mechanism. If the installed hardware and operating system support a
high-resolution performance counter, then the Frequency value reflects
the frequency of that counter. Otherwise, the Frequency value is based
on the system timer frequency.

Because the Stopwatch frequency depends on the installed hardware and
operating system, the Frequency value remains constant while the
system is running.

So essentially the frequency of the stopwatch can be different on different hardware which means the ticks are of a different size (and of a different size to the tick in the timespan and datetime objects).

Interestingly you are already using teh stopwatch Property that gives you a timespan. sw.Elapsed is a tiemspan which is probably what you are after when you are trying to get the timespan object.

"Interestingly you are already using the stopwatch Property that gives you a timespan" - Yeah, I originally used this in a base class for a game and it just worked well enough until now. I have no idea what I was thinking. Thanks very much for your answer though!
–
TonyOct 18 '11 at 15:28