Kanzi  3.9.6
Kanzi Engine API
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(). More...
 
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. More...
 
 StopWatch ()
 Constructor. More...
 

Protected Attributes

TimePoint m_previousTime
 Time during last update. More...
 

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: