Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZE::ZTimer Class Reference

#include <ZE_ZTimer.h>

List of all members.

Detailed Description

ZTimer timing class, class wraps common features of SDL timer. Inherited from ZObject and tied to ZEngine main timer.

Public Member Functions

 ZTimer (bool useZEngine=true)
 Constructs a new Timer.

virtual ~ZTimer ()
 Virtual Destructor.

void Reset ()
 Reset Timer.

void Pause ()
 Pause Timer.

void Unpause ()
 Unpause Timer.

Uint32 GetTime () const
 Get Time of Timer.

bool IsPaused () const
 Get paused state.

Protected Member Functions

Uint32 GetParentTime () const
 Get time from parent timer.

Protected Attributes

 Pointer to ZEngine Object.

bool rPaused
 Paused / Unpaused state of Timer.

bool rUseZEngine
 Using ZEngine timer or SDL global timer.

Uint32 rPausedTime
 Total time this timer has been paused.

Uint32 rLastPause
 Time this Timer was paused.

Constructor & Destructor Documentation

ZE::ZTimer::ZTimer bool  useZEngine = true  ) 

Sets TimePaused to current ZEngine time if useZEngine is true, otherwise uses SDL timer.

useZEngine Tells if timer should use ZEngine or SDL.

ZE::ZTimer::~ZTimer  )  [virtual]

Virtual destructor making future inheritance safe.

Member Function Documentation

Uint32 ZE::ZTimer::GetParentTime  )  const [protected]

Protected method to get time from whichever timer is parent.

Time on parent timer.

void ZE::ZTimer::Reset  ) 

Set Timer back to Zero, will also unpause timer if it was paused.

void ZE::ZTimer::Pause  ) 

Pause the timer if it is unpaused.

void ZE::ZTimer::Unpause  ) 

Unpause the timer if it is paused.

Uint32 ZE::ZTimer::GetTime  )  const

Get current time accounting for time paused.

Current Timer Time.

bool ZE::ZTimer::IsPaused  )  const

Find out paused state of timer.

Paused state for timer.

The documentation for this class was generated from the following files:
Generated on Sun Oct 5 19:34:46 2003 for ZEngine by doxygen1.3