|
Boost : |
Subject: Re: [boost] [Timer] Inconsistent behaviour
From: Jordans, R. (r.jordans_at_[hidden])
Date: 2008-10-29 05:54:09
It seems that there is an ancient Track ID for this problem as well
https://svn.boost.org/trac/boost/ticket/1962
I've just added a comment there that illustrates the effect of clock() on Linux
- Roel
________________________________________
From: boost-bounces_at_[hidden] [boost-bounces_at_[hidden]] On Behalf Of Jordans, R. [r.jordans_at_[hidden]]
Sent: 29 October 2008 10:27
To: boost_at_[hidden]
Subject: [boost] [Timer] Inconsistent behaviour
Hey all,
I was looking at Boost.Timer and I noticed that it shows different results when it's used in a threaded program on Windows or Unix machines. A closer inspection revealed that it uses clock() to do it's timings.
Digging a bit deeper I found that clock() is specified differently on Windows than it is in my Linux man-page. On windows it counts 'wall clock' time, basically what I'd expect from a class named timer but on Linux it counts CPU time. Thus it will give the result for completely different concepts of time elapsed depending on my system.
Two questions; 1) is there a good way to solve this, 2) if not, could it at least be noted in the documentation.
Thanks,
Roel
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk