Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B0239E3.947D80F4@gatwick.geco-prakla.slb.com> Date: Wed, 16 May 2001 09:27:15 +0100 From: Don Scales X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: clock subroutine in mingw returns wall clock times Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit There seems to be a problem with the clock subroutine in the mingw library libcrtdll.a This subroutine should return the number of CPU clock ticks used by the program at the time the subroutine is called. The clock routine in the cygwin library works ok. The clock routine in the mingw library seems to return wall clock time. Regards Don ---- #include #include int main() { long ca,cb,wa,wb; float c,w; char s[10]; ca = clock(); wa=time(0); printf("hit enter when ready"); gets(s); cb=clock(); wb=time(0); c=(float) cb-ca; w=(float)wb-wa; c = c/(float)CLOCKS_PER_SEC; printf("wall=%f, cpu=%f\n",w,c); } -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple