delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/17/16:06:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3F1701B7.5000201@integrian.com>
Date: Thu, 17 Jul 2003 16:06:15 -0400
From: Chris Church <cchurch AT integrian DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030620 Debian/1.3-4.lindows37
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 1.5.0 - gettimeofday() out of sync with Windows time

I'm using version 1.5.0 of the cygwin1.dll on Windows 2000 
Professional.  I've also seen the problem described below on earlier 
versions of cygwin (1.3.22).

I've found that the gettimeofday() and ftime() functions do not always 
return the correct system time as reported by Windows.  The time() 
function, however, always remains in sync with Windows time.  This 
discrepancy occurs when an application is started, then the Windows 
system time changes, then the application calls gettimeofday() or 
ftime() to retrieve the current system time.   Both gettimeofday() and 
ftime() always report the same incorrect time.  It also appears that the 
time as reported by gettimeofday() and ftime() is based on a counter 
that is initialized to match the system time, but once started, 
increments at a constant rate regardless of any changes to the Windows 
time.  (I have not yet dug into the source for Cygwin to see how these 
functions are implemented.)  Finally, the time reported by 
gettimeofday() and ftime(), when used within an application that runs 
for an extended period of time, will drift from the Windows time.

Is this a known issue with Cygwin, and are there any patches available?

Any help would be greatly appreciated.



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019