mf
Media Framework
|
Stop watch which measures total time passed between start() and stop() calls. More...
#include <stopwatch.h>
Public Types | |
using | clock_type = std::chrono::high_resolution_clock |
using | time_point_type = typename clock_type::time_point |
using | duration_type = typename clock_type::duration |
Public Member Functions | |
void | reset () |
Reset accumulated duration and stop. More... | |
void | start () |
Start the stopwatch. More... | |
void | stop () |
Stop the stopwatch, and add duration since last start() call to total duration. More... | |
duration_type | total_duration () const |
Get total duration. More... | |
Stop watch which measures total time passed between start() and stop() calls.
Can accumulate multiple time intervals.
using mf::stopwatch::clock_type = std::chrono::high_resolution_clock |
using mf::stopwatch::duration_type = typename clock_type::duration |
using mf::stopwatch::time_point_type = typename clock_type::time_point |
|
inline |
Reset accumulated duration and stop.
|
inline |
Start the stopwatch.
|
inline |
Stop the stopwatch, and add duration since last start()
call to total duration.
|
inline |
Get total duration.
Cannot be called while stopwatch is running.