1.7.5-1: problem with settimeofday() & gettimeofday()

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Wed May 26 14:25:00 GMT 2010


On Wed, May 26, 2010 at 04:02:45PM +0300, "??? ??????" wrote:
>> Hello. It seems that I found a problem with settimeofday() and
>> gettimeofday() calls in a single context. The problem is that if we
>> set a new time with settimeofday() call it completes succefully and
>> system time is updated. But then if we try to get current time with
>> gettimeofday() call it returns old time!
>
>I've looked into 'times.cc' and found that 'hires_ms gtod' timer
>(which is used in gettimeofday()) is not reset with
>'hires_ms::prime()' in settimeofday() after system call to Win32 API
>SetSystemTime() function! I think this is the reason of described
>behaviour.

That sounds right.  I'll check in a fix shortly.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list