|
smats
0.0.1
Satisfability Modulo Arithmetic Theories Symbols
|
#include <timer.h>
Public Types | |
using | clock = T |
typedef clock::duration | duration |
typedef clock::time_point | time_point |
Public Member Functions | |
TimerBase () | |
void | start () |
void | pause () |
void | resume () |
bool | is_running () const |
duration | elapsed () const |
std::chrono::duration< double >::rep | seconds () const |
TimerBase< T > & | operator+= (const TimerBase< T > &other) |
TimerBase< T > | operator+ (const TimerBase< T > &other) const |
Protected Member Functions | |
time_point | now () const |
Simple timer class to evaluate the performance of the software.
smats::TimerBase< T >::TimerBase | ( | ) |
Construct a new timer base object.
|
nodiscard |
Get read-only access to the duration of elapsed time of the timer.
|
nodiscard |
Check whether the timer is running.
|
inlinenodiscardprotected |
Get read-only access to the current instant of the timer.
void smats::TimerBase< T >::pause | ( | ) |
Pause the timer.
If the timer is not running, this function does nothing.
void smats::TimerBase< T >::resume | ( | ) |
Resume the timer.
If the timer is not running, this function does nothing.
|
nodiscard |
Get read-only access to the number elapsed seconds of the timer.
void smats::TimerBase< T >::start | ( | ) |
Start the timer.
The timer is reset to zero.