24#if !defined _WIN32 && !defined __MINGW32__
25 #include <sys/resource.h>
56#if !defined _WIN32 && !defined __MINGW32__
110 WatchDog(
const unsigned int& seconds);
Time code execution with at least 1 us resolution. The time resolution can be stored up to ....
Definition: Timer.h:40
double getElapsed() const
Get total elapsed time. It returns the sum of all the elapsed time between all the start/stop session...
Definition: Timer.cc:87
Timer()
Default constructor. Initialize internal variables. It does NOT start timing.
Definition: Timer.cc:42
static long double getCurrentTime()
Get the current time.
Definition: Timer.cc:115
void stop()
Stop the timer. It can be restarted afterward, adding time to what was already timed.
Definition: Timer.cc:67
void reset()
Reset the timer to zero.
Definition: Timer.cc:77
void restart()
Reset and start the timer.
Definition: Timer.cc:58
long double start_point
Definition: Timer.h:51
void start()
Start the timer.
Definition: Timer.cc:48
double elapsed
Definition: Timer.h:52
bool isRunning
Definition: Timer.h:53
Process usage timer for Posix This is based on getrusage and thus returns detailed timing information...
Definition: Timer.h:63
static const int who
Definition: Timer.h:78
bool is_running
Definition: Timer.h:82
void restart()
Definition: Timer.cc:144
void getElapsedTimes()
Definition: Timer.cc:182
double getElapsed()
Definition: Timer.cc:155
struct rusage start_usage current_usage
Definition: Timer.h:80
double sys_time
Definition: Timer.h:81
double user_time
Definition: Timer.h:81
void stop()
Definition: Timer.cc:136
UsageTimer()
Definition: Timer.cc:126
double elapsed
Definition: Timer.h:81
void start()
Definition: Timer.cc:128
void reset()
Definition: Timer.cc:151
double getElapsedSystemTime()
Definition: Timer.cc:173
double getElapsedUserTime()
Definition: Timer.cc:164
A software watchdog, killing the current process after the given number of seconds.
Definition: Timer.h:104
WatchDog(const unsigned int &seconds)
Create the watchdog.
Definition: Timer.cc:232