Boost logo

Boost Users :

From: KSpam (keesling_spam_at_[hidden])
Date: 2006-09-17 13:46:02


I would like to use boost::timer to replace a timing object from another
library.  In looking into the header file, I noticed the following comments:

//  It is recommended that implementations measure wall clock rather than CPU
//  time since the intended use is performance measurement on systems where
//  total elapsed time is more important than just process or CPU time.

All is well and good I thought to myself ... wall clock is exactly what I
want!  But alas, the implementation just wraps std::clock().  The man page
for clock states the following:

"The clock() function returns an approximation of processor time used by the
program."

In summary, the header states that the timer implementation should use wall
clock time, but it ignores its own advice and uses processor time.  I'm
confused.  Do I need to create my own timer implementation in order to use
wall clock time?

Thanks,
Justin


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