Improving setitimer resolution

Christopher Faylor
Thu Jul 17 04:08:00 GMT 2003

On Wed, Jul 16, 2003 at 11:05:50PM -0400, Pierre A. Humblet wrote:
>I am trying to improve the resolution of the Cygwin timers
>(setitimer, alarm, ualarm) by using the multimedia timers,
>which have 1 ms resolution.

What is different about using multimedia timers here?  I had to abandon
them for settimeofday due to the fact that suspending the computer caused
timing anomalies.

>Incidentally how-signals-work says
>"After determining that sigsave is available, setup_handler will take one
>of two routes, depending on whether the main thread is executing in the
>cygwin DLL or is currently in "user" code.  We'll discuss the cygwin DLL
>case first."
>Is the second case discussed?

No.  It's simple though.   SetThreadContext is used to force a call to
the signal handler which then returns to the location where the signal


More information about the Cygwin-developers mailing list