1 #ifndef __DIADES__UTILS__TIMER__HH 2 #define __DIADES__UTILS__TIMER__HH 13 using std::runtime_error;
14 using std::domain_error;
36 TimerInvalid(
const string& whatArg) : runtime_error(whatArg), domain_error(whatArg)
38 cerr <<
"EXCEPTION Timer -> " << whatArg << endl;
57 cout <<
"TimeOut from timer " << timer << endl;
92 Timer(
const string & label,
long int delay);
111 long int getTime()
const;
149 void createTimer(
const string & label,
long int delay);
154 void stopTimer(
const string & label);
159 long int getTime(
const string & label)
const {
return timers.find(label)->second->getTime(); }
map< string, Timer * > timers
TimerInvalid(const string &whatArg)
long int getTime(const string &label) const
TimerTimeOut(const string &timer)
Namespace of the Diades project.
static TimerFactory * _instance