Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Server-Uuid: 28431ec2-fd89-11d2-a089-00a0c9f498e6 Message-ID: <0DB4E7930F5CD411AC93009027EE744C09345B41@ddcexch.ddcnet.detroitdiesel.com> From: "Kilroy, David" To: "'Philip Aston'" cc: "'cygwin AT cygwin DOT com'" Subject: RE: [PATCH] gettimeofday time travels Date: Wed, 8 May 2002 14:31:20 -0400 MIME-Version: 1.0 X-WSS-ID: 10C7B13E53209-01-01 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit 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/