nomlib
Loading...
Searching...
No Matches
nom::Timer Class Reference
Inheritance diagram for nom::Timer:
[legend]

Public Member Functions

void start (void)
void stop (void)
void restart (void)
 Alias for start.
void pause (void)
void unpause (void)
uint32 ticks (void) const
bool started (void) const
bool paused (void) const
const std::string ticksAsString (void) const
real32 to_seconds () const

Static Public Member Functions

static uint32 to_milliseconds (real32 seconds)
 Convert milliseconds to seconds.
static real32 to_seconds (uint32 ticks)
 Convert a timer value to seconds.

Private Attributes

uint32 elapsed_ticks
 Milliseconds since timer start.
uint32 paused_ticks
 Holds ticks while paused.
bool timer_paused
 Tracks whether we are paused or not.
bool timer_started
 Tracks whether we are started or not.

Detailed Description

Definition at line 39 of file Timer.hpp.

Member Function Documentation

◆ to_milliseconds()

uint32 nom::Timer::to_milliseconds ( real32 seconds)
static

Convert milliseconds to seconds.

Parameters
elapsed_ticksA timing value in milliseconds to convert.
See also
::ticks, nom::ticks

◆ to_seconds()

real32 nom::Timer::to_seconds ( uint32 ticks)
static

Convert a timer value to seconds.

Parameters
elapsed_ticksA timing value in milliseconds to convert.
See also
::ticks, nom::ticks

Member Data Documentation

◆ elapsed_ticks

uint32 nom::Timer::elapsed_ticks
private

Milliseconds since timer start.

Definition at line 79 of file Timer.hpp.

◆ paused_ticks

uint32 nom::Timer::paused_ticks
private

Holds ticks while paused.

Definition at line 82 of file Timer.hpp.

◆ timer_paused

bool nom::Timer::timer_paused
private

Tracks whether we are paused or not.

Definition at line 85 of file Timer.hpp.

◆ timer_started

bool nom::Timer::timer_started
private

Tracks whether we are started or not.

Definition at line 88 of file Timer.hpp.


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