Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Timer Class Reference

#include <Timer.h>

List of all members.

Public Member Functions

void init ()
void update ()
float getFrameTime ()
int getFPS ()
double getTime ()
double getFrequency ()

Protected Attributes

double frequency
__int64 startClock
float frameTime
float frameStart
float frameEnd
float fpsLimiter
int fps
int frameCount


Detailed Description

Timer.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 14 of file Timer.h.


Member Function Documentation

int Timer::getFPS  ) 
 

Definition at line 66 of file Timer.cpp.

References fps.

Referenced by WinMain().

float Timer::getFrameTime  ) 
 

Definition at line 62 of file Timer.cpp.

References frameTime.

Referenced by WinMain().

double Timer::getFrequency  ) 
 

Definition at line 70 of file Timer.cpp.

References frequency.

double Timer::getTime  ) 
 

Definition at line 56 of file Timer.cpp.

References frequency, and startClock.

Referenced by init(), and update().

void Timer::init  ) 
 

Timer.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 9 of file Timer.cpp.

References fps, fpsLimiter, frameCount, frameEnd, frameStart, frameTime, frequency, getTime(), and startClock.

Referenced by WinMain().

Here is the call graph for this function:

void Timer::update  ) 
 

do { frameEnd = (float)getTime(); frameTime = frameEnd - frameStart; } while (frameEnd == frameStart || frameTime <= 0.02f);

frameStart = frameEnd;

Definition at line 26 of file Timer.cpp.

References fps, fpsLimiter, frameCount, frameEnd, frameStart, frameTime, and getTime().

Referenced by WinMain().

Here is the call graph for this function:


Member Data Documentation

int Timer::fps [protected]
 

Definition at line 30 of file Timer.h.

Referenced by getFPS(), init(), and update().

float Timer::fpsLimiter [protected]
 

Definition at line 29 of file Timer.h.

Referenced by init(), and update().

int Timer::frameCount [protected]
 

Definition at line 31 of file Timer.h.

Referenced by init(), and update().

float Timer::frameEnd [protected]
 

Definition at line 28 of file Timer.h.

Referenced by init(), and update().

float Timer::frameStart [protected]
 

Definition at line 27 of file Timer.h.

Referenced by init(), and update().

float Timer::frameTime [protected]
 

Definition at line 26 of file Timer.h.

Referenced by getFrameTime(), init(), and update().

double Timer::frequency [protected]
 

Definition at line 24 of file Timer.h.

Referenced by getFrequency(), getTime(), and init().

__int64 Timer::startClock [protected]
 

Definition at line 25 of file Timer.h.

Referenced by getTime(), and init().


Generated on Sun Jun 5 15:51:06 2005 for Defacto by  doxygen 1.4.3