Implements a simple stopwatch that starts on construction.
More...
#include <stopwatch.h>
|
std::chrono::time_point< std::chrono::steady_clock > | m_timestamp |
|
Implements a simple stopwatch that starts on construction.
Definition at line 16 of file stopwatch.h.
◆ stopwatch()
◆ reset()
void stopwatch::reset |
( |
| ) |
|
|
inline |
Reset the stopwatch to count from this moment onwards.
Definition at line 25 of file stopwatch.h.
◆ seconds()
double stopwatch::seconds |
( |
| ) |
|
|
inline |
- Returns
- The time in seconds since the last reset.
Definition at line 37 of file stopwatch.h.
◆ time()
long long stopwatch::time |
( |
| ) |
|
|
inline |
- Returns
- The time in milliseconds since the last reset.
Definition at line 31 of file stopwatch.h.
◆ m_timestamp
std::chrono::time_point<std::chrono::steady_clock> stopwatch::m_timestamp |
|
private |
The documentation for this class was generated from the following file: