X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=3.4 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_45,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <494B1DBB.5040704@bigpond.com> Date: Fri, 19 Dec 2008 15:06:19 +1100 From: fred Reply-To: fred AT delorie DOT com User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: gettimeofday - millisecond accuracy Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH PLAIN at nschwotgx01p.mx.bigpond.com from [124.183.95.174] using ID zfred at Fri, 19 Dec 2008 04:00:15 +0000 X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150203.494B1C4F.0087,ss=1,fgs=0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 with my test of gettimeofday in cygwin it appears to be counting in milliseconds rather than microseconds. so I had a look at where it is coded, /winsup/cygwin/times.cc ... gettimeofday (struct timeval *tv, void *tzvp) { struct timezone *tz = (struct timezone *) tzvp; static bool tzflag; LONGLONG now = gtod.usecs (); ... I notice there is hires_ms NO_COPY gtod; however lower down there is appears to be a hires_us class coded. So I am wondering what the story is behind this ? I will look at testing some changes here and testing, just need to do a successful build from source of as is first..... I am looking for microsecond resolution, and see that hires_us is using QueryPerformanceFrequency/QueryPerformanceCounter, so thats looking good I think? I have code that does bitbanging to the parallel port, it works perfectly under linux, and would like to see it work in cygwin also. Thanks -- 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/