Re: Time::HiRes usleep on windows strange behaviour...please please help!!



mastermagrath wrote:

> what confuses me is what is the point in
> having high res functions when you say that a rounding of 1/100sec
> ticks is expected?!!
> How then do programmers generally control loops to finer timeslices,
> i'm sure it must be quite common to accurately control the frequency of
> iteration of loops to a finer frequency than 1/100??

Your timer resolution will be equal to the time duration between system ticks.
This is a value directly dependent on system load; higher load, less accuracy.

On the average, your maximum resolution will be ten milliseconds.

However, for NT4 and NT5 system types, you can install a hyper-kernel
which preempts default system interrupts allowing resolution down to
ten microseconds for an old Pentium running at 133 mHz.

Modern NT systems, such as my dual processor machine, can reach
a resolution of three to five microseconds.

If you are interesting in timing packets, use configurable ping software
such as WS_Pro PingPack. Resolution for WS Ping is as low as
one millisecond, and sometimes reports zero milliseconds.

MSDOS Ping will report speeds less than ten milliseconds, when
pinging a very fast host or your localhost, but that report will
read < 10 milliseconds by default.

Rather pointless to pursue faster speeds for internet transaction
packets. Your speed will be that of the slowest gateway, not
your system.

Purl Gurl
.



Relevant Pages

  • Re: VB6 code runs different speeds on different PCs
    ... As you've discovered, the minimum Sleep period can be different on different machines (5 milliseconds on my own WinXP system, but longer than that on others I think). ... You can get whatever "game rate" you want in a closed loop of course, by checking a high resolution timing source. ... If I were you I would use a proper Timer with a higher resolution that the standard VB Timer and run your entire game in the Timer event. ... Admittedly, updating their positions more than once every ten milliseconds does appear to give smoother animation (even though the video frame rate simply cannot draw a new frame at a rate greater than every 10 milliseconds,or so, depending on your display settings) because it tends iron out the differences more. ...
    (microsoft.public.vb.general.discussion)
  • Re: Call for performance evaluation: net.isr.direct (fwd)
    ... The schedulers already just use ticks (actually dynamic calls from ... statclock() to count ticks and do other things). ... need anywhere near 1ms resolution, and have never used 1ms resolution, ...
    (freebsd-net)
  • Re: timing VBA execution
    ... Not sure 10 milliseconds is enough resolution, ... > OSAX is Open Scripting Architecture eXtension - also called a Scripting ... > Since the PowerPC has a microsecond timer available, ...
    (microsoft.public.mac.office.excel)
  • Re: alternative to gettickcount
    ... before proceeding with a timing test). ... a dozen milliseconds before calling timeGetTime?] ... resolution of timeGetTime does NOT default to one millisecond. ... It's an XP system at the moment, and the resolution appears to be the ...
    (microsoft.public.vb.general.discussion)
  • Re: Post processing of NTP data...
    ... When queried as to the time using O/S services, these systems respond with the current value of the clock register. ... milliseconds and the typical error is 5 milliseconds. ... Some very new hardware designs allow ntpd to interpolate between "ticks" and yield a much more precise time, if and only if, you use NTP supplied functions to get the time. ...
    (comp.protocols.time.ntp)

Loading