Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
mazes::progress< Time, Clock > Class Template Reference

Simple clock for elapsed events. More...

#include <progress.h>

Public Member Functions

void start () noexcept
 Start the progress.
 
void reset () noexcept
 Reset the progress.
 
template<typename T = double>
elapsed () noexcept
 Capture the elapsed time.
 

Static Public Member Functions

template<typename F , typename... Args, typename Duration = Time>
static Duration duration (F &&f, Args &&... args)
 Measures the duration of a callable object.
 

Detailed Description

template<typename Time = std::chrono::microseconds, typename Clock = std::chrono::high_resolution_clock>
class mazes::progress< Time, Clock >

Simple clock for elapsed events.

This class is used to track the elapsed time between two events

Thread safe with mutexes

Member Function Documentation

◆ duration()

template<typename Time = std::chrono::microseconds, typename Clock = std::chrono::high_resolution_clock>
template<typename F , typename... Args, typename Duration = Time>
static Duration mazes::progress< Time, Clock >::duration ( F && f,
Args &&... args )
inlinestatic

Measures the duration of a callable object.

Template Parameters
FThe type of the callable object
...ArgsThe types of the arguments to the callable object
DurationThe type of the duration to return
Parameters
fThe callable object
args
...argsThe arguments to pass to the callable object
Returns
The duration of the callable object

◆ elapsed()

template<typename Time = std::chrono::microseconds, typename Clock = std::chrono::high_resolution_clock>
template<typename T = double>
T mazes::progress< Time, Clock >::elapsed ( )
inlinenoexcept

Capture the elapsed time.

Template Parameters
T
Returns

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