Mail Archives: cygwin/2002/05/08/14:34:47
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 AT bea DOT com]
> Sent: Wednesday, May 08, 2002 10:03 AM
> To: cygwin AT cygwin DOT 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/
- Raw text -