Kanzi 3.9.10
kanzi::StopWatch Class Reference

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.
 

Detailed Description

Stop watch is a class for measuring time.

Constructor & Destructor Documentation

◆ StopWatch()

kanzi::StopWatch::StopWatch ( )

Constructor.

Member Function Documentation

◆ getDeltaTime()

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().

◆ peekDeltaTime()

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.

Member Data Documentation

◆ m_previousTime

TimePoint kanzi::StopWatch::m_previousTime
protected

Time during last update.


The documentation for this class was generated from the following file: