33 #include "StMuTimer.h"
40 double StMuTimer::resolution()
const
42 return 1./double(CLOCKS_PER_SEC);
45 double StMuTimer::elapsedTime()
const
47 return (mIsStopped ? mStopTime : absoluteTime()) - mStartTime;
50 void StMuTimer::reset()
57 void StMuTimer::start()
59 mStartTime = absoluteTime() - elapsedTime();
63 void StMuTimer::stop()
65 mStopTime = absoluteTime();
70 double StMuTimer::absoluteTime()
72 return (
double)clock()/CLOCKS_PER_SEC;