Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Ogre::Timer Class Reference

Platform-independent Timer class. More...

#include <OgreTimer.h>

Inheritance diagram for Ogre::Timer:

Ogre::GLXTimer Ogre::SDLTimer Ogre::Win32Timer List of all members.

Public Member Functions

 Timer ()
 Creates a timer.

virtual ~Timer ()
virtual void reset ()
 Resets timer.

virtual unsigned long getMilliseconds ()
 Returns milliseconds since initialisation or last reset.

virtual unsigned long getMillisecondsCPU ()
 Returns milliseconds since initialisation or last reset, only CPU time measured.

virtual unsigned long getMicroseconds ()
 Returns microseconds since initialisation or last reset.

virtual unsigned long getMicrosecondsCPU ()
 Returns microseconds since initialisation or last reset, only CPU time measured.


Protected Attributes

clock_t zeroClock

Detailed Description

Platform-independent Timer class.

Remarks:
You should never create a Timer instance manually; instead, use PlatformManager::createTimer.

Definition at line 36 of file OgreTimer.h.


Constructor & Destructor Documentation

Ogre::Timer::Timer  ) 
 

Creates a timer.

Remarks:
You must call reset() after creating it; the constructor cannot do it because the call would not be polymorphic.

virtual Ogre::Timer::~Timer  )  [virtual]
 

Definition at line 48 of file OgreTimer.h.


Member Function Documentation

virtual unsigned long Ogre::Timer::getMicroseconds  )  [virtual]
 

Returns microseconds since initialisation or last reset.

Reimplemented in Ogre::GLXTimer, Ogre::SDLTimer, and Ogre::Win32Timer.

virtual unsigned long Ogre::Timer::getMicrosecondsCPU  )  [virtual]
 

Returns microseconds since initialisation or last reset, only CPU time measured.

virtual unsigned long Ogre::Timer::getMilliseconds  )  [virtual]
 

Returns milliseconds since initialisation or last reset.

Reimplemented in Ogre::GLXTimer, Ogre::SDLTimer, and Ogre::Win32Timer.

virtual unsigned long Ogre::Timer::getMillisecondsCPU  )  [virtual]
 

Returns milliseconds since initialisation or last reset, only CPU time measured.

virtual void Ogre::Timer::reset  )  [virtual]
 

Resets timer.

Reimplemented in Ogre::GLXTimer, Ogre::SDLTimer, and Ogre::Win32Timer.


Member Data Documentation

clock_t Ogre::Timer::zeroClock [protected]
 

Definition at line 39 of file OgreTimer.h.


The documentation for this class was generated from the following file:

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:45:50 2006