This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Improving setitimer resolution


At 12:08 AM 7/17/2003 -0400, Christopher Faylor wrote:
>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.

Ability to produce short delays and better resolution, as shown in 
previous mail. Also uses the same resolution as gettimeofday.
I assume you switched gettimeofday to multimedia time last year
to improve the resolution.
Do you get timing anomalies with gettimeofday when suspending the
computer? 

B.t.w., I can produce cases where gettimeofday() diverges from time(),
which is based on system time, because the system time is a software
clock subject to manual (user) and automatic (network time)
adjustments, while multimedia time is hardware based.
 
>>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
>happened.

Thanks.

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]