This is the mail archive of the cygwin@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: [PATCH] gettimeofday time travels



cgf writes:
 > On Mon, Apr 15, 2002 at 09:58:48PM +0100, Philip Aston wrote:
 > >How about the attached quick and dirty fix?
 > 
 > I'm sorry but I don't think a quick and dirty fix is justified if
 > there are other alternatives. I haven't seen any other alternatives
 > discussed yet.

Understood and appreciated. Here's some justificiation/discussion for
my fix.

I'm no W32 expert but:

1. Suspend and resume changes the counters in a seemingly
   unpredictable way. (I'd have guessed that the counters would have
   been "suspended" and hence the reported time after a suspend would
   be in the past). I wouldn't want to patch into suspend notification
   API's to implement this.

2. There are other situations in which the base time could
   be invalidated (NTP update, timezone change, user clock change).
   How can/should we detect and react to these events?

3. There is a chance that QueryPerformance* _should_ take
   suspend/resume into account and that my hardware is at fault. Any
   volunteers to run my test case on their machines?

- Phil


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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