# Ogre::Timer Class Reference

Platform-independent Timer class. More...

`#include <OgreTimer.h>`

Inheritance diagram for Ogre::Timer:

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:

- OgreTimer.h

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:41:10 2005