Stopwatch policy backed by std::chrono::steady_clock. More...
#include <mxvk/include/mxvk/mxvk_stopwatch.hpp>
Public Member Functions | |
| void | echo (std::string_view name) const |
| Print the recorded interval in milliseconds and nanoseconds. | |
| void | start () |
| Record the beginning of a timed interval. | |
| void | stop () |
| Record the end of a timed interval. | |
| unsigned long | timePassed () const |
| Return the time elapsed since the most recent start(). | |
Stopwatch policy backed by std::chrono::steady_clock.
The steady clock is monotonic, making this policy suitable for measuring elapsed wall-clock time even if the system clock is adjusted. Elapsed queries are returned in milliseconds.
Definition at line 30 of file mxvk_stopwatch.hpp.
|
inline |
Print the recorded interval in milliseconds and nanoseconds.
| name | Descriptive name shown with the timing result. |
Call stop() before calling this function.
Definition at line 48 of file mxvk_stopwatch.hpp.
|
inline |
Record the beginning of a timed interval.
Definition at line 33 of file mxvk_stopwatch.hpp.
|
inline |
Record the end of a timed interval.
Definition at line 38 of file mxvk_stopwatch.hpp.
|
inline |
Return the time elapsed since the most recent start().
Definition at line 63 of file mxvk_stopwatch.hpp.