X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 26 May 2010 10:22:15 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: 1.7.5-1: problem with settimeofday() & gettimeofday() Message-ID: <20100526142214.GB20644@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 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