
On Tue, Apr 16, 2013 at 12:42 PM, Michael Powell
Hello,
I am trying to setup a "simple" elapsed timer abstraction to hide the boost::timer::cpu_timer concern.
However, I am finding that the usage example illustrated here does not compile, or I am not including something I need to include (more likely).
http://www.boost.org/doc/libs/1_53_0/libs/timer/doc/cpu_timers.html#using-cp...
//Apparently something like this works with my toolchain. Not sure about the illustration. Probably a language standards difference. elapsed_timer::nanosecond_type const elapsed_timer::elapsed() { //The auto type exposes system and user. Not sure why. auto elapsed_times = m_timer.elapsed(); //Result elapsed time is system plus user. return elapsed_times.system + elapsed_times.user; } FWIW, I am building with Sourcery CodeBench which I believe is GCC 4.7.2 toolchain.
Might there be more complete working examples I can draw from?
Thank you...
Regards,
Michael Powell