CTimer Class Reference

The CTimer class provides an accurate timer using the Windows API. More...

#include <CTimer.h>

List of all members.

Public Member Functions

 CTimer (void)
void Update ()
void Pause (void)
void Resume (void)
void SetSpeed (float Speed)
float GetDeltaTime (void)
double GetTime (void)

Private Member Functions

double GetCurrentTime ()

Private Attributes

__int64 m_StartClock
double m_InvRate
double m_Time
float m_DeltaTime
bool m_Pause
float m_DeltaTimeAtPause
float m_Speed


Detailed Description

The CTimer class provides an accurate timer using the Windows API.

It can return the current time since the construction of the timer, and the deltatime (time between last call to get deltatime and the next call). It also handles pauses during the execution so that the deltatime when resuming is not huge but normal.


Constructor & Destructor Documentation

CTimer::CTimer ( void   )  [inline]

Here is the call graph for this function:


Member Function Documentation

double CTimer::GetCurrentTime (  )  [inline, private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CTimer::Update ( void   )  [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

void CTimer::Pause ( void   )  [inline]

Here is the caller graph for this function:

void CTimer::Resume ( void   )  [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

void CTimer::SetSpeed ( float  Speed  )  [inline]

Here is the caller graph for this function:

float CTimer::GetDeltaTime ( void   )  [inline]

double CTimer::GetTime ( void   )  [inline]


Member Data Documentation

double CTimer::m_InvRate [private]

double CTimer::m_Time [private]

float CTimer::m_DeltaTime [private]

bool CTimer::m_Pause [private]

float CTimer::m_DeltaTimeAtPause [private]

float CTimer::m_Speed [private]


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

Generated on Sat Oct 18 12:26:48 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo