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


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


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