Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csVirtualClock Class Reference

This is an implementation of a virtual clock. More...

#include <virtclk.h>

Inheritance diagram for csVirtualClock:

iVirtualClock iBase List of all members.

Public Methods

 csVirtualClock ()
virtual ~csVirtualClock ()
virtual void Advance ()
 Advance the engine's virtual-time clock.

virtual void Suspend ()
 Suspend the engine's virtual-time clock.<. More...

virtual void Resume ()
 Resume the engine's virtual-time clock.<. More...

virtual csTicks GetElapsedTicks () const
 Query the time elapsed between the two most recent invocations of Advance().

virtual csTicks GetCurrentTicks () const
 Returns the absolute time of the last call to Advance().


Public Attributes

 SCF_DECLARE_IBASE

Detailed Description

This is an implementation of a virtual clock.

Using this clock you can easily keep track of elapsed and current time in a virtual setting.


Member Function Documentation

void csVirtualClock::Resume ( ) [inline, virtual]
 

Resume the engine's virtual-time clock.<.

p> Call this function when the client application begins invoking Advance() again after extended down-time. This function is the complement of SuspendVirtualTimeClock().

Reimplemented from iVirtualClock.

void csVirtualClock::Suspend ( ) [inline, virtual]
 

Suspend the engine's virtual-time clock.<.

p> Call this function when the client application will fail to call Advance() for an extended period of time. Suspending the virtual-time clock prevents a temporal anomaly from occurring the next time GetElapsedTicks() is called after the application resumes invoking Advance().

Reimplemented from iVirtualClock.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000