MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
util::ClockTimer Class Reference

Simple timer class to take execution times. More...

#include <timer.h>

Public Member Functions

 ClockTimer (void)
 
std::size_t get_elapsed (void) const
 
float get_elapsed_sec (void) const
 
void reset (void)
 

Static Public Member Functions

static std::size_t now (void)
 
static float now_sec (void)
 

Detailed Description

Simple timer class to take execution times.

The reported float values are in seconds, the integer values are in milli seconds. The functions that provide milli seconds should be preferred. The precision of this timer is limited (~10ms, depending on the system).

This class should not be used for timings that rely on the actual real world time but rather for computational timings. The timings here are pure processing times which vary from real time if the application is scheduled (e.g. when using I/O) or sleeps or uses several threads.

Definition at line 63 of file timer.h.

Constructor & Destructor Documentation

◆ ClockTimer()

util::ClockTimer::ClockTimer ( void  )
inline

Definition at line 109 of file timer.h.

Member Function Documentation

◆ get_elapsed()

std::size_t util::ClockTimer::get_elapsed ( void  ) const
inline

Definition at line 139 of file timer.h.

◆ get_elapsed_sec()

float util::ClockTimer::get_elapsed_sec ( void  ) const
inline

Definition at line 133 of file timer.h.

◆ now()

std::size_t util::ClockTimer::now ( void  )
inlinestatic

Definition at line 127 of file timer.h.

◆ now_sec()

float util::ClockTimer::now_sec ( void  )
inlinestatic

Definition at line 121 of file timer.h.

◆ reset()

void util::ClockTimer::reset ( void  )
inline

Definition at line 115 of file timer.h.


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