Stop watch is a class for measuring time. More...
#include <kanzi/core/time/stop_watch.hpp>
Public Member Functions | |
chrono::nanoseconds | getDeltaTime () |
Returns the number of nanoseconds since the last call to getDeltaTime(), or the number of nanoseconds since the StopWatch was constructed if this is the first call to getDeltaTime(). | |
chrono::nanoseconds | peekDeltaTime () const |
Returns the number of nanoseconds since the last call to getDeltaTime(), or the number of nanoseconds since the StopWatch was constructed if getDeltaTime() has not been called. | |
StopWatch () | |
Constructor. | |
Protected Attributes | |
TimePoint | m_previousTime |
Time during last update. | |
Stop watch is a class for measuring time.
kanzi::StopWatch::StopWatch | ( | ) |
Constructor.
chrono::nanoseconds kanzi::StopWatch::getDeltaTime | ( | ) |
Returns the number of nanoseconds since the last call to getDeltaTime(), or the number of nanoseconds since the StopWatch was constructed if this is the first call to getDeltaTime().
chrono::nanoseconds kanzi::StopWatch::peekDeltaTime | ( | ) | const |
Returns the number of nanoseconds since the last call to getDeltaTime(), or the number of nanoseconds since the StopWatch was constructed if getDeltaTime() has not been called.
|
protected |
Time during last update.