Hi, Cor,
Thanks for the update and the link. Yes, there is no "absolute"
accuracy -- even on a real-time OS. (And Windows doesn't even pretend
to be real-time.)
I guess that the real question is: "Is it accurate enough?". I think
that the Now function might not be accurate enough for the needs of the
OP -- but then again, it might. QueryPerformanceCounter will probably
be accurate enough, but it is not available on all systems and there are
a few subtleties involved in using it.
It looks like StopWatch is basically a wrapper for whatever tool
provides the greatest accuracy. (This is probably
QueryPerformanceCounter on most systems, but TickCount on others). This
is certainly easier than having to code for both possibilities like I
had to do in VB6. I'm still using the earlier version. Too bad it's
not available there too.
Groetjes,
Randy
Cor Ligthert [MVP] wrote:
Randy,
There is no accurate method on a Windows OS computer, which is not
completely isolated from the outer-world, even not that API.
Therefore I used in version 1.x forever environment.timerticks while there
is now in 2.0 the stopwatch class
http://msdn2.microsoft.com/en-us/lib...sw(VS.80).aspx
Cor