|
Avara3D 0.2.0
C++ API reference
|
Manually controlled steady-clock timer that stores its most recently measured duration. More...
#include <a3d/util/Timer.h>
Public Member Functions | |
| Timer (bool start=true) | |
Creates a Timer, starting it immediately unless start is false. More... | |
| void | start () |
| Starts or restarts timing from the current steady-clock time. More... | |
| std::chrono::nanoseconds | stop () |
| Stores and returns the elapsed duration since the most recent start(). More... | |
| std::chrono::nanoseconds | duration () const |
| Returns the most recently stored duration in nanoseconds. More... | |
| double | durationSeconds () const |
| Returns the most recently stored duration as fractional seconds. More... | |
| std::int64_t | durationMilliseconds () const |
| Returns the most recently stored duration as whole milliseconds. More... | |
Manually controlled steady-clock timer that stores its most recently measured duration.
|
explicit |
Creates a Timer, starting it immediately unless start is false.
| std::chrono::nanoseconds a3d::util::Timer::duration | ( | ) | const |
Returns the most recently stored duration in nanoseconds.
| std::int64_t a3d::util::Timer::durationMilliseconds | ( | ) | const |
Returns the most recently stored duration as whole milliseconds.
| double a3d::util::Timer::durationSeconds | ( | ) | const |
Returns the most recently stored duration as fractional seconds.
| void a3d::util::Timer::start | ( | ) |
Starts or restarts timing from the current steady-clock time.
| std::chrono::nanoseconds a3d::util::Timer::stop | ( | ) |