Class · aurore

aurore::Timer

On this page
aurore/core/timer.hpp
#include <aurore/core/timer.hpp>

class aurore::Timer : public aurore::FiniteTicking

Functions 7

void start(Time duration)

Starts the timer directly with a given duration, in ms.

timer.hpp:32
void start()

Starts the timer with the already set duration.

timer.hpp:37
void setDuration(Time duration)

Sets the duration of the timer, in ms. Does not stop or reset it.

timer.hpp:43
virtual void onStart() override

Called when the ticking becomes active.

Overrides aurore::Ticking::onStart

timer.hpp:45
virtual bool onUpdate(Time delta) override

Executed every frame while the ticking lives. Delta is the time difference in ms between the last frame and the current one. Must return false if the ticking is finished and should be removed from the list of active tickings. The end callback will automatically be called then.

Overrides aurore::Ticking::onUpdate

timer.hpp:46
virtual void onReset() override

Called when the ticking gets reset.

Overrides aurore::FiniteTicking::onReset

timer.hpp:47
virtual void onRewind() override

Called when the ticking gets rewound.

Overrides aurore::FiniteTicking::onRewind

timer.hpp:48

Also the functions of aurore::FiniteTicking (2), aurore::Ticking (5).

Protected attributes 2

Time duration = 0
Time progress = 0

Read from Aurore's headers by Doxygen at each build · library/include