Game Develop C++ Platform: ManualTimer Class Reference

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | List of all members
ManualTimer Class Reference
Game engine

Manual timer updated using ManualTimer::UpdateTime member function. More...

`#include <ManualTimer.h>`

## Public Member Functions

| ManualTimer (std::string name_)
std::string | GetName ()
void | UpdateTime (signed long long time_)
void | Reset ()
signed long long | GetTime () const
void | SetTime (signed long long newTime)
bool | IsPaused () const
void | SetPaused (bool newState=true)

## Detailed Description

Manual timer updated using ManualTimer::UpdateTime member function.

A manual timer is a timer which is updated manually by calling ManualTimer::UpdateTime.

## Constructor & Destructor Documentation

ManualTimer::ManualTimer | ( | std::string | name_) |  |

Constructor

Parameters

  name_ | The name of the timer

## Member Function Documentation

std::string ManualTimer::GetName | ( | ) |  |

inline

Get the name of the timer

Returns
  Timer's name

signed long long ManualTimer::GetTime | ( | ) |  | const

inline

Get the current time elapsed, in microseconds.

Returns
  Time elapsed

bool ManualTimer::IsPaused | ( | ) |  | const

inline

Get the paused state of the timer.

Returns
  true if paused

void ManualTimer::Reset | ( | ) |  |

inline

Reset time to zero.

void ManualTimer::SetPaused | ( | bool | newState = `true`) |  |

inline

Set the paused state of the timer.

Parameters

  newState | The new state ( true = paused )

void ManualTimer::SetTime | ( | signed long long | newTime) |  |

inline

Change the timer's value.

Parameters

  newTime | The timer's new value

void ManualTimer::UpdateTime | ( | signed long long | time_) |  |

inline

Update the time of the timer

Parameters

  time_ | Time to add in microseconds

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

- ManualTimer.h
- ManualTimer.cpp