MeteoIODoc 2.11.0
mio::UsageTimer Class Reference

Detailed Description

Process usage timer for Posix This is based on getrusage and thus returns detailed timing information about how the time was spend (userland, system time).

Author
Thomas Egger

#include <Timer.h>

Public Member Functions

 UsageTimer ()
 
void start ()
 
void restart ()
 
void stop ()
 
void reset ()
 
double getElapsed ()
 
double getElapsedUserTime ()
 
double getElapsedSystemTime ()
 

Protected Member Functions

void getElapsedTimes ()
 

Protected Attributes

struct rusage start_usage current_usage
 
double user_time
 
double sys_time
 
double elapsed
 
bool is_running
 

Static Protected Attributes

static const int who = RUSAGE_SELF
 

Constructor & Destructor Documentation

◆ UsageTimer()

mio::UsageTimer::UsageTimer ( )

Member Function Documentation

◆ getElapsed()

double mio::UsageTimer::getElapsed ( )

◆ getElapsedSystemTime()

double mio::UsageTimer::getElapsedSystemTime ( )

◆ getElapsedTimes()

void mio::UsageTimer::getElapsedTimes ( )
protected

◆ getElapsedUserTime()

double mio::UsageTimer::getElapsedUserTime ( )

◆ reset()

void mio::UsageTimer::reset ( )

◆ restart()

void mio::UsageTimer::restart ( )

◆ start()

void mio::UsageTimer::start ( )

◆ stop()

void mio::UsageTimer::stop ( )

Member Data Documentation

◆ current_usage

struct rusage start_usage mio::UsageTimer::current_usage
protected

◆ elapsed

double mio::UsageTimer::elapsed
protected

◆ is_running

bool mio::UsageTimer::is_running
protected

◆ sys_time

double mio::UsageTimer::sys_time
protected

◆ user_time

double mio::UsageTimer::user_time
protected

◆ who

const int mio::UsageTimer::who = RUSAGE_SELF
staticprotected

The documentation for this class was generated from the following files: