persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
Timer Class Reference

#include <timer.hpp>

Public Member Functions

void start (ae::q20_12_t durationSeconds)
 Starts a timer.
bool isFinished ()
 Checks if the timer expired.
ae::q20_12_t getDuration ()
 Gets duration of the timer.
ae::q20_12_t getElapsed ()
 Gets elapsed time since the timer was started.
ae::q20_12_t getProgress ()
 Gets progress of how much of the time has passed.

Private Attributes

uint32_t startFrame = 0
uint32_t durationFrames = 0
bool running = false

Detailed Description

Definition at line 15 of file timer.hpp.

Member Function Documentation

◆ getDuration()

ae::q20_12_t Timer::getDuration ( )

Gets duration of the timer.

Returns
Duration in seconds.

Definition at line 26 of file timer.cpp.

Here is the caller graph for this function:

◆ getElapsed()

ae::q20_12_t Timer::getElapsed ( )

Gets elapsed time since the timer was started.

Returns
Elapsed time in seconds.

Definition at line 32 of file timer.cpp.

Here is the caller graph for this function:

◆ getProgress()

ae::q20_12_t Timer::getProgress ( )

Gets progress of how much of the time has passed.

Returns
Progress percentage.

Definition at line 39 of file timer.cpp.

Here is the call graph for this function:

◆ isFinished()

bool Timer::isFinished ( )

Checks if the timer expired.

Returns
Returns if the timer is finished.

Definition at line 17 of file timer.cpp.

◆ start()

void Timer::start ( ae::q20_12_t durationSeconds)

Starts a timer.

Parameters
durationSecondsHow long it takes until the Timer is finished in seconds.

Definition at line 5 of file timer.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ durationFrames

uint32_t Timer::durationFrames = 0
private

Definition at line 55 of file timer.hpp.

◆ running

bool Timer::running = false
private

Definition at line 56 of file timer.hpp.

◆ startFrame

uint32_t Timer::startFrame = 0
private

Definition at line 54 of file timer.hpp.


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