sub msec sleep/timers

Pierre A. Humblet
Thu Sep 18 23:23:00 GMT 2003

At 01:59 PM 9/18/2003 -0500, Brian Ford wrote:
>Pierre, are you or anyone else planning on enhancing
>nanosleep/usleep/itimer functions, etc. to sub msec accuracy?


I have an implementation with 1 ms resolution using the multimedia
timer (available on all platforms). It works fine on NT but I belatedly
discovered that the max delay is 64k ms on Win9x, so more work is 
still required there.
If you go ahead with WaitableTimers I will stop my efforts, so let
us know.
You may want to check the effective resolution of such timers. 
It's not because they measure time in 100ns units that they have
100ns resolution. For example the current timer measures time in ms
but has 10 ms resolution on NT, more on 9X.


>It looks like it could be done via [Create|Open|Set|Cancel]WaitableTimer,
>at least on >= 9.  Would this be an acceptable enhancement for >= 98
>systems via a wincap test or the like?
>If so, and no one is working on it, I may take a shot.  We have in-house
>vis-sim apps that could really benefit from sub msec accuracy/scheduling.
>If anyone has looked at this before and has tips/pointers/"you can't do
>that", etc., please let me know.  I am quite new to Windows programming.
>Brian Ford
>Senior Realtime Software Engineer
>VITAL - Visual Simulation Systems
>FlightSafety International
>Phone: 314-551-8460
>Fax:   314-551-8444

More information about the Cygwin-developers mailing list