$Bill writes:
> Works for me - the longer the time, the more accurate it should be since
> timers don't have the same resolution that clocks do.  I think they're
> accurate to 10-15 msec on Intel and use message passing which could affect
> shorter times.  You can also use Win32::GetTickCount for a possibly more
> accurate resolution (not a timer per se).  QueryPerformanceCounter /
> QueryPerformanceFrequency can access an 8 usec counter if avail.  I have
> some code after this snippet that you could try if you need to time a
> chunk of code accurately - just call start_PC_timer before and stop_PC_timer
> after.

Time::HiRes already uses the performance counter method on Windows, so
you shouldn't need to fiddle with it yourself.

There is some logic in Time::HiRes to adjust for the drift between the
performance counters and the real time clock, which may affect accuracy
for long time intervals.

Cheers,
-Jan

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to