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


> Both approaches cope with suspend/resume and base time changes of more
> than delta.
>
> I the decision is now a question of efficiency. My approach is
> simpler, and it means we don't have to call both
> QueryPerformanceCounter and GetSystemTime every time. It also means we
> don't have to do arithmetic to get the result of GetSystemTime in some
> form in which it can be compared to our QueryPerformanceCounter
> calculation.
>
> I can't see any other reason to pick ChrisJ's method over mine?
>
> Thoughts anyone...?
Re-initializing primed_ft periodically will cause the timer to jump around
whenever you do it since there may have been performance counter ticks in
between the last system tick. In fact the time may even appear to go
backwards. I don't know if this is such a good idea.

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]