quill
|
A stopwatch utility for measuring elapsed time since construction. More...
#include <StopWatch.h>
Public Member Functions | |
StopWatch () | |
Constructor. | |
std::chrono::duration< double > | elapsed () const |
Returns the elapsed time since construction. More... | |
template<typename T > | |
T | elapsed_as () const |
Returns the elapsed time since construction as the specified duration type. More... | |
void | reset () |
Resets the stopwatch, starting the measurement from the current time. | |
A stopwatch utility for measuring elapsed time since construction.
Displays elapsed time as seconds (double) or any specified duration type.
Can use either TSC-based or system clock-based timing, depending on the template parameter ClockType
.
Example:
|
inline |
Returns the elapsed time since construction.
std::chrono::duration<double>
in seconds.
|
inline |
Returns the elapsed time since construction as the specified duration type.