Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Info: This message was accepted for relay by smtp03.mrf.mail.rcn.net as the sender used SMTP authentication X-Trace: UmFuZG9tSVb4bD8HU4+O+LNo8xWD1CY5Qa55z35zwx/zkxeQZpi0e26Hk0DgSqO/ Message-ID: <3F172175.9040506@cygwin.com> Date: Thu, 17 Jul 2003 18:21:41 -0400 From: Larry Hall Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.5.0 - gettimeofday() out of sync with Windows time References: <3F1701B7 DOT 5000201 AT integrian DOT com> <3F171ABE DOT 6020205 AT cygwin DOT com> <20030717220827 DOT GB24025 AT redhat DOT com> In-Reply-To: <20030717220827.GB24025@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Christopher Faylor wrote: > On Thu, Jul 17, 2003 at 05:53:02PM -0400, Larry Hall wrote: > >>Chris Church wrote: >> >> >>>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? >> >>Not yet. But this was mentioned on the developer's list this morning >>and someone is looking at the problem. > > > Sorry, no, no one is looking at the problem. It's been a known problem > since the implementation. I stand corrected. Rereading the thread, I see that it simply mentions this problem relative to another line of investigation. So dig in! :-) -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/