This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What does clock() return?


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.Abazarov@comAcast.net> wrote in message news:%23gH7pzEZEHA.992@TK2MSFTNGP10.phx.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]