Ogre::Timer Class Reference
Core » General

Timer class. More...

`#include <OgreTimerImp.h>`

Inheritance diagram for Ogre::Timer:
[legend]

## Public Member Functions

| Timer ()
| Timer ()
| Timer ()
| Timer ()
| Timer ()
| Timer ()
| Timer ()
| Timer constructor. More...
| ~Timer ()
| ~Timer ()
| ~Timer ()
| ~Timer ()
| ~Timer ()
| ~Timer ()
| ~Timer ()
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicroseconds ()
| Returns microseconds since initialisation or last reset. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMicrosecondsCPU ()
| Returns microseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMilliseconds ()
| Returns milliseconds since initialisation or last reset. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
unsigned long | getMillisecondsCPU ()
| Returns milliseconds since initialisation or last reset, only CPU time measured. More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
void | reset ()
| Resets timer. More...
void | reset ()
| Resets timer. More...
void | reset ()
| Resets timer. More...
void | reset ()
| Resets timer. More...
void | reset ()
| Resets timer. More...
void | reset ()
| Resets timer. More...
void | reset ()
| Resets timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...
bool | setOption (const String &strKey, const void *pValue)
| Method for setting a specific option of the Timer. More...

## Private Member Functions

DWORD | GetTickCount ()

## Private Attributes

LARGE_INTEGER | mFrequency
LONGLONG | mLastTime
DWORD | mStartTick
LARGE_INTEGER | mStartTime
DWORD_PTR | mTimerMask
clock_t | mZeroClock
struct timeval | start
clock_t | zeroClock

## Detailed Description

Timer class.

Definition at line 37 of file Android/OgreTimerImp.h.

## Constructor & Destructor Documentation

## Timer() [1/7]

Ogre::Timer::Timer | ( |  | ) |

## ~Timer() [1/7]

Ogre::Timer::~Timer | ( |  | ) |

## Timer() [2/7]

Ogre::Timer::Timer | ( |  | ) |

## ~Timer() [2/7]

Ogre::Timer::~Timer | ( |  | ) |

## Timer() [3/7]

Ogre::Timer::Timer | ( |  | ) |

## ~Timer() [3/7]

Ogre::Timer::~Timer | ( |  | ) |

## Timer() [4/7]

Ogre::Timer::Timer | ( |  | ) |

## ~Timer() [4/7]

Ogre::Timer::~Timer | ( |  | ) |

## Timer() [5/7]

Ogre::Timer::Timer | ( |  | ) |

## ~Timer() [5/7]

Ogre::Timer::~Timer | ( |  | ) |

## Timer() [6/7]

Ogre::Timer::Timer | ( |  | ) |

## ~Timer() [6/7]

Ogre::Timer::~Timer | ( |  | ) |

## Timer() [7/7]

Ogre::Timer::Timer | ( |  | ) |

Timer constructor.

MUST be called on same thread that calls getMilliseconds()

## ~Timer() [7/7]

Ogre::Timer::~Timer | ( |  | ) |

## Member Function Documentation

## getMicroseconds() [1/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicroseconds() [2/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicroseconds() [3/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicroseconds() [4/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicroseconds() [5/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicroseconds() [6/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicroseconds() [7/7]

unsigned long Ogre::Timer::getMicroseconds | ( |  | ) |

Returns microseconds since initialisation or last reset.

## getMicrosecondsCPU() [1/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMicrosecondsCPU() [2/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMicrosecondsCPU() [3/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMicrosecondsCPU() [4/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMicrosecondsCPU() [5/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMicrosecondsCPU() [6/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMicrosecondsCPU() [7/7]

unsigned long Ogre::Timer::getMicrosecondsCPU | ( |  | ) |

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

## getMilliseconds() [1/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMilliseconds() [2/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMilliseconds() [3/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMilliseconds() [4/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMilliseconds() [5/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMilliseconds() [6/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMilliseconds() [7/7]

unsigned long Ogre::Timer::getMilliseconds | ( |  | ) |

Returns milliseconds since initialisation or last reset.

## getMillisecondsCPU() [1/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## getMillisecondsCPU() [2/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## getMillisecondsCPU() [3/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## getMillisecondsCPU() [4/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## getMillisecondsCPU() [5/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## getMillisecondsCPU() [6/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## getMillisecondsCPU() [7/7]

unsigned long Ogre::Timer::getMillisecondsCPU | ( |  | ) |

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

## GetTickCount()

DWORD Ogre::Timer::GetTickCount | ( |  | ) |

private

Definition at line 62 of file WIN32/OgreTimerImp.h.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## reset() [1/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## reset() [2/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## reset() [3/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## reset() [4/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## reset() [5/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## reset() [6/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## reset() [7/7]

void Ogre::Timer::reset | ( |  | ) |

Resets timer.

## setOption() [1/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

Definition at line 60 of file Android/OgreTimerImp.h.

## setOption() [2/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

Definition at line 60 of file OSX/OgreTimerImp.h.

## setOption() [3/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

Definition at line 60 of file GLX/OgreTimerImp.h.

## setOption() [4/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

Definition at line 60 of file FlashCC/OgreTimerImp.h.

## setOption() [5/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

Definition at line 60 of file iOS/OgreTimerImp.h.

## setOption() [6/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

Definition at line 64 of file NaCl/OgreTimerImp.h.

## setOption() [7/7]

bool Ogre::Timer::setOption | ( | const String & | strKey,
|  | const void * | pValue
| ) |  |

Method for setting a specific option of the Timer.

These options are usually specific for a certain implementation of the Timer class, and may (and probably will) not exist across different implementations. reset() must be called after all setOption() calls.

  Current options supported are:
  - "QueryAffinityMask" (DWORD): Set the thread affinity mask to be used to check the timer. If 'reset' has been called already this mask should overlap with the process mask that was in force at that point, and should be a power of two (a single core).

Parameters

  strKey | The name of the option to set
  pValue | A pointer to the value - the size should be calculated by the timer based on the key

Returns
  On success, true is returned.

  On failure, false is returned.

## Member Data Documentation

## mFrequency

LARGE_INTEGER Ogre::Timer::mFrequency

private

Definition at line 56 of file WIN32/OgreTimerImp.h.

## mLastTime

LONGLONG Ogre::Timer::mLastTime

private

Definition at line 54 of file WIN32/OgreTimerImp.h.

## mStartTick

DWORD Ogre::Timer::mStartTick

private

Definition at line 53 of file WIN32/OgreTimerImp.h.

## mStartTime

LARGE_INTEGER Ogre::Timer::mStartTime

private

Definition at line 55 of file WIN32/OgreTimerImp.h.

## mTimerMask

DWORD_PTR Ogre::Timer::mTimerMask

private

Definition at line 59 of file WIN32/OgreTimerImp.h.

## mZeroClock

clock_t Ogre::Timer::mZeroClock

private

Definition at line 51 of file WIN32/OgreTimerImp.h.

## start

struct timeval Ogre::Timer::start

private

Definition at line 40 of file Android/OgreTimerImp.h.

## zeroClock

clock_t Ogre::Timer::zeroClock

private

Definition at line 41 of file Android/OgreTimerImp.h.

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

- Android/OgreTimerImp.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.