delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
delpi::TimerBase< T > Class Template Reference

Simple timer class to evaluate the performance of the software. More...

#include <Timer.h>

Public Member Functions

void Start ()
 Start the timer.
void Pause ()
 Pause the timer.
void Resume ()
 Resume the timer.

Private Attributes

bool running_ {false}
 Whether the timer is running or not.
time_point last_start_ {}
 Last time_point when the timer is started or resumed.
duration elapsed_ {}
 Elapsed time so far. This doesn't include the current fragment if it is running.

Detailed Description

template<typename T>
class delpi::TimerBase< T >

Simple timer class to evaluate the performance of the software.

The timer can be started, paused, and resumed. The elapsed time is returned in seconds or as a duration.

Definition at line 26 of file Timer.h.

Member Function Documentation

◆ Pause()

template<class T>
void delpi::TimerBase< T >::Pause ( )

Pause the timer.

If the timer is not running, this function does nothing.

Definition at line 30 of file Timer.cpp.

◆ Resume()

template<class T>
void delpi::TimerBase< T >::Resume ( )

Resume the timer.

If the timer is not running, this function does nothing.

Definition at line 38 of file Timer.cpp.

◆ Start()

template<class T>
void delpi::TimerBase< T >::Start ( )

Start the timer.

The timer is reset to zero.

Definition at line 22 of file Timer.cpp.


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