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


Having only recently joined the list, I never saw the original emails. But,
after digging them up from the archives ...

An alternative method would be to listen for a suspend (or resume) and
somehow either
 a) reset gtod::inited to FALSE. gtod::prime runs on next call of
gettimeofday
 b) call gtod::prime() immediately (on resume)

However, both mean making the local static variable gtod visible at a higher
level (or provision of an interface for the reset)

I believe the relevant windows message to look for is WM_POWERBROADCAST
(PBT_APMSUSPEND, PBT_APMRESUMESUSPEND). While you're there, you might as
well listen for WM_TIMECHANGE to handle base time changes.

Not being familiar with cygwin source, I can't say where this would go
(assuming cygwin pays attention to windows messages). Also suspend
consistently crashes all the windows boxes I have used, so I can't really
test this.


Dave.


> -----Original Message-----
> From: Philip Aston [mailto:paston@bea.com]
> Sent: Wednesday, May 08, 2002 10:03 AM
> To: cygwin@cygwin.com
> Subject: Re: [PATCH] gettimeofday time travels
> 
> 
> 
> Hi Christopher,
> 
> cgf writes on 15 Apr:
>  > 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.
> 
> No other alternatives have been proposed. I'm aware of a couple of
> other XEmacs'ers who are plagued by this (we love our uptime).
> 
> I don't believe my patch to be dirtier than the implementation (no
> offence intended!). Please reconsider it.
> 
> Thanks,
> 
> - 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/
> 
> 


--
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]