This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] gettimeofday time travels
- From: "Chris January" <chris at atomice dot net>
- To: <cygwin at cygwin dot com>
- Date: Thu, 9 May 2002 00:23:50 +0100
- Subject: Re: [PATCH] gettimeofday time travels
- References: <15547.16136.163472.840007@bea.com><20020415214133.GA19612@redhat.com> <15577.12319.622365.566799@bea.com>
> > >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.
On Windows NT, you can use the ZwQuerySystemInformation internal call with
the SystemTimeOfDayInformation structure to get the current time of day at a
greater resolution than you can with the Performance counters. I'm not sure
about the granularity though - that's something that would have to be
tested. However the value doesn't suffer from time-travelling problems. If
indeed the granularity is too coarse, you could still use the value to check
that the QueryPerformanceCounters value is sane (which is what I believe
this discussion was originally about).
Regards
Chris
--
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/