|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tiny start/stop wall-clock timer. More...
#include <ca-bench.H>
Public Member Functions | |
| void | restart () noexcept |
Restart the timer to now(). | |
| double | elapsed_seconds () const noexcept |
| double | elapsed_milliseconds () const noexcept |
Private Types | |
| using | clock_type = std::chrono::steady_clock |
| using | time_point = clock_type::time_point |
Private Attributes | |
| time_point | start_ = clock_type::now() |
Tiny start/stop wall-clock timer.
Wraps std::chrono::steady_clock so the timer cannot be tricked by wall-clock adjustments. Construction starts the timer; restart() resets it to now(); elapsed_seconds() and elapsed_milliseconds() read the duration without stopping the clock.
Definition at line 72 of file ca-bench.H.
|
private |
Definition at line 74 of file ca-bench.H.
|
private |
Definition at line 75 of file ca-bench.H.
|
inlinenoexcept |
restart(). Definition at line 94 of file ca-bench.H.
References Aleph::blossom_maximum_cardinality_matching(), and elapsed_seconds().
|
inlinenoexcept |
restart() (or construction). Definition at line 86 of file ca-bench.H.
References Aleph::blossom_maximum_cardinality_matching(), and start_.
Referenced by Aleph::CA::bench_seconds(), and elapsed_milliseconds().
|
inlinenoexcept |
|
private |
Definition at line 76 of file ca-bench.H.
Referenced by elapsed_seconds(), and restart().