Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

gbtime::Server Class Reference

Manages timers and updates through a singleton. More...

#include <server.h>

List of all members.

Static Public Methods

int Init ()
 First call to server, or call after a Destroy().

void Destroy ()
 Shutdown server.

int IsPaused ()
 Determine if server is paused.

void Pause ()
 Stops server from updating. Timers return same time elapsed.

void UnPause ()
 Resume server updates.

void Update ()
 Updates timers.

float Frequency ()
 .

float Period ()
 .

int NumTimers ()
 Number of timers allocated.

int IsTimer (int t)
 Determine if an int is a timer.

int StartTimer ()
 Allocates a timer. Returns the index of the timer on success else NULLTIMER.

void StopTimer (int &t)
 Deallocates the timer. Sets it to NULLTIMER.

void ResetTimer (int t)
 .

float SecondsSince (int t=NULLTIMER)
 Determine elapsed time.

int ExpiredTimer (int t, float seconds)
 Determine if timer has expired.


Detailed Description

Manages timers and updates through a singleton.

Todo:
gbtime::Server - Create a timer type instead of using unsigned ints.


Member Function Documentation

int gbtime::Server::ExpiredTimer int    t,
float    seconds
[inline, static]
 

Determine if timer has expired.

Parameters:
t  - timer
seconds  - number of seconds
Return values:
0  Timer has not expired.
1  Timer has expired.

float gbtime::Server::SecondsSince int    t = NULLTIMER [inline, static]
 

Determine elapsed time.

Returns :
Number of seconds since timer was reset or If NULLTIMER was passed, number of seconds since last update.


The documentation for this class was generated from the following files:
Generated on Mon Sep 2 14:52:34 2002 for GunBuster Engine by doxygen1.2.17