Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgClock Class Reference

General purpose real-time clock object. More...

#include <ddgclock.h>

List of all members.

Public Members

 ddgClock ( float init = 0.0)
Create a clock and initialize its time.

float update (void)
Returns elapsed in milli seconds time since last call.

void set (int t)
Set the clock to some time in seconds.

float getSysTime (void)
Get time in seconds.

float getElapsed (void)
Get elapsed time in seconds.

float getFrameRate (void)
Calculate a frame rate based on time since last call.

float getAvgFrameRate (void)
Calculate an averaged frame rate. Across ddgFPSBUFSIZE frames.

float getSimTime (float *h = 0, float *m = 0, float *s = 0, float *r = 0)
If r is given, r returns the number of partial seconds and s is rounded.

void start ( float t)
Set the start time in sim seconds.

void simfactor ( float f )
Set the conversion factor for sys seconds to sim seconds..

float getDayLight (void)
Return the light intensity. 0 at night, 1 during day, inbetween at dusk and dawn.

void perf ( unsigned int tf )
Set perf on or off.

bool perfDump ( ddgStr *filename = NULL, char *s = NULL )
Write collected performance information to a logfile or standard out. Return true on error.

Static Public Members

void timeStamp ( ddgStr *timestamp )
Generate a timestamp string.

Detailed Description

General purpose real-time clock object.

The documentation for this class was generated from the following files:
Generated at Sun Sep 17 19:27:52 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999