Class for cpu time benchmarking.
More...
Class for cpu time benchmarking.
Usage:
sleep(1);
BOOST_REQUIRE_CLOSE(t.
getwct(),1.0,10.0);
sleep(1);
sleep(1);
BOOST_REQUIRE_CLOSE(t.
getwct(),2.0,10.0);
BOOST_REQUIRE_CLOSE(t.
getwct(),0.0,10.0);
Definition at line 25 of file timer.hpp.
#include <timer.hpp>
|
bool | running |
|
struct timespec | tsstart |
|
clock_t | cstart |
|
struct timespec | tsstop |
|
clock_t | cstop |
|
double timer::getcputime |
( |
| ) |
|
|
inline |
Return the cpu time.
Definition at line 114 of file timer.hpp.
Return the elapsed real time.
Definition at line 102 of file timer.hpp.
Start the timer.
Definition at line 67 of file timer.hpp.
Stop the timer.
Definition at line 91 of file timer.hpp.
The documentation for this class was generated from the following file: