1 #ifndef MAQUIS_TIMINGS_H
2 #define MAQUIS_TIMINGS_H
7 #include <boost/chrono.hpp>
28 t0 = boost::chrono::system_clock::now();
33 boost::chrono::duration<double> sec = boost::chrono::system_clock::now() -
t0;
42 os << timer.
name <<
" " << timer.
val <<
", nCounter : " << timer.
nCounter;
49 boost::chrono::system_clock::time_point
t0;
54 class TimerOMP :
public Timer {
56 TimerOMP(std::string name_) :
Timer(name_), timer_start(0.0), timer_end(0.0){}
61 timer_start = omp_get_wtime();
65 timer_end = omp_get_wtime();
66 val += timer_end - timer_start;
69 double timer_start, timer_end;
boost::chrono::system_clock::time_point t0
friend std::ostream & operator<<(std::ostream &os, Timer const &timer)
unsigned long long nCounter
Timer & operator+=(double t)