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

clocker Class Reference

System clock. More...

#include <clocker.h>

List of all members.

Public Methods

 clocker (void)
 Constructor.

 ~clocker (void)
 Destructor.

void reset (void)
 Resets the clock. More...

void update (void)
 Update the clock. More...

double elapsed () const
 Returns how much time (in seconds) has elapsed since the last update.


Detailed Description

System clock.

Used to measure elapsed time. Useful for delta t physics motion and frames per second calculations.

Definition at line 21 of file clocker.h.


Member Function Documentation

void clocker::reset void   
 

Resets the clock.

Sets the elapsed time to 0.0. Sets the previous timestamp to now.

Definition at line 29 of file clocker.cpp.

Referenced by video_X::init, and video_sdl::init.

void clocker::update void   
 

Update the clock.

Determines how much time has elapsed since the last update. This method should be called once (and only once) per frame.

Definition at line 41 of file clocker.cpp.

Referenced by video_X::start_frame, and video_sdl::start_frame.


Generated on Tue Feb 11 18:49:43 2003 for uber by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002