11Timer* ScopedTimer::p_timer;
13ScopedTimer::ScopedTimer()
18ScopedTimer::ScopedTimer(
const std::string& name) { p_timer->tick(name); }
20ScopedTimer::~ScopedTimer() { p_timer->tock(); }
22void ScopedTimer::substitute(
const std::string& newName)
25 p_timer->tick(newName);
28void ScopedTimer::setTimerAddress(
Timer* timer) { p_timer = timer; }
30Timer& ScopedTimer::timer() {
return *p_timer; }
A class for a hierarchical timer functions.