Boost logo

Boost Users :

Subject: Re: [Boost-users] Interaction between boost::timer and boost::thread
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-09-08 12:40:31


----- Original Message -----
From: "Matthieu Brucher" <matthieu.brucher_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Wednesday, September 08, 2010 5:48 PM
Subject: Re: [Boost-users] Interaction between boost::timer and boost::thread

>
> 2010/9/8 Roman Perepelitsa <roman.perepelitsa_at_[hidden]>:
>> 2010/9/8 Matthieu Brucher <matthieu.brucher_at_[hidden]>
>>>
>>> Is there a known interaction between these two classes? I'm trying to
>>> create a simple example, but I can't get boost::timer to count sleep()
>>> time :|
>>
>> Timer uses clock() internally, which counts only CPU time on Linux and total
>> time on Windows.
>> Given non-portable nature of Boost.Timer, I would not recommend using it.
>> Roman Perepelitsa.
>
> It's strange that it is available in Boost without this kind of warning!
> Is there a portable and reliable timer in Boost ?

You can take a look at Boost.Chrono, and Boost.Stopwatches which should be review soon.

https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Chrono
https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Stopwatches

best,
Vicente


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net