OdinAI
 All Classes Namespaces Functions Variables
OdinAI::Timer Class Reference

Public Types

typedef
high_resolution_clock::time_point 
TimePoint
 

Public Member Functions

void Reset ()
 
template<typename T >
GetElapsedTime ()
 
template<typename T >
GetElapsedMillisec ()
 
template<typename T >
GetMillisec ()
 
template<typename T >
GetTime ()
 

Static Public Member Functions

static bool Init ()
 
static void GlobalReset ()
 
template<typename T >
static T GetGlobalElapsedTime ()
 
template<typename T >
static T GetGlobalElapsedMillisec ()
 
template<typename T >
static T GetGlobalMillisec ()
 

Public Attributes

TimePoint m_startTime
 
TimePoint m_elapsedTime
 

Static Public Attributes

static TimePoint m_gStartTime
 
static TimePoint m_gElapsedTime
 

Member Function Documentation

template<typename T >
T OdinAI::Timer::GetElapsedMillisec ( )
inline

Time since last call to this or other functions, which also use elapsed time.

template<typename T >
T OdinAI::Timer::GetElapsedTime ( )
inline

Elapsed time from last call to this function, or other functions which also use elapsed time.

Returns
Real number in seconds.
template<typename T >
static T OdinAI::Timer::GetGlobalElapsedMillisec ( )
inlinestatic

Elapsed ticks from last call to this or other functions, which also use elapsed time..

template<typename T >
static T OdinAI::Timer::GetGlobalElapsedTime ( )
inlinestatic

Elapsed time from last call to this function, or other functions which also use elapsed time.

Returns
Real number in seconds.
template<typename T >
static T OdinAI::Timer::GetGlobalMillisec ( )
inlinestatic

Time since last reset of global clock.

template<typename T >
T OdinAI::Timer::GetMillisec ( )
inline

Time since last reset of this instance.

template<typename T >
T OdinAI::Timer::GetTime ( )
inline

Time since last reset of this instance.

static void OdinAI::Timer::GlobalReset ( )
inlinestatic

Resets the global clock.

static bool OdinAI::Timer::Init ( )
inlinestatic

Initialize timer. NOTE: This function should only be called once!

void OdinAI::Timer::Reset ( )
inline

Reset this instance of timer.


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