Stopwatch policy backed by std::chrono::high_resolution_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::high_resolution_clock.
This policy provides the clock's finest available resolution. Elapsed queries are returned in nanoseconds.
Definition at line 78 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 96 of file mxvk_stopwatch.hpp.
|
inline |
Record the beginning of a timed interval.
Definition at line 81 of file mxvk_stopwatch.hpp.
|
inline |
Record the end of a timed interval.
Definition at line 86 of file mxvk_stopwatch.hpp.
|
inline |
Return the time elapsed since the most recent start().
Definition at line 111 of file mxvk_stopwatch.hpp.