delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: | <6.0.1.1.0.20040708050901.01f75730@imap.myrealbox.com> |
X-Sender: | tprince AT imap DOT myrealbox DOT com |
Date: | Thu, 08 Jul 2004 05:20:45 -0700 |
To: | "Alex Vinokur" <alexvn AT connect DOT to>, cygwin AT cygwin DOT com |
From: | Tim Prince <tprince AT computer DOT org> |
Subject: | Re: What does clock() return? |
In-Reply-To: | <cciguv$e7o$1@sea.gmane.org> |
References: | <cciguv$e7o$1 AT sea DOT gmane DOT org> |
Mime-Version: | 1.0 |
X-IsSubscribed: | yes |
At 09:01 PM 7/7/2004, Alex Vinokur wrote: >Here is an article >http://groups.google.com/groups?selm=2l2ucgF7jv50U1%40uni-berlin.de >from http://groups.google.com/groups?group=microsoft.public.vc.language > > >"Victor Bazarov" <v DOT Abazarov AT comAcast DOT net> wrote in message >news:%23gH7pzEZEHA DOT 992 AT TK2MSFTNGP10 DOT phx DOT gbl... > > Is it a known issue that in VC++ RTL the function 'clock()' > > reports the wall clock instead of CPU time used? I ran this > > test program on Windows and Unix: A long standing "problem." As Win9x had no choice other than wall clock time, MSVCRTL gives you no choice. Other compiler vendors make the choice according to which version of Windows is running. If you choose ProcessTime(), the resolution is 0.010 seconds, which is unsatisfactory for many small benchmarks, so then we must over-ride it by using the rdtsc counter directly. Here is my understanding of the decision: for cygwin, the primary goal is compatibility with gcc running on other OS. For mingw, the goal is compatibility with Microsoft practice, where feasible. Thus, no chance of compatibility between mingw and cygwin on this point. Tim Prince -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |