Class · aurore

aurore::RepeatingTimer

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

class aurore::RepeatingTimer : public aurore::Ticking

Functions 6

void start(Time period)

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

timer.hpp:63
void start()

Starts the timer with the already set period.

timer.hpp:68
void setPeriod(Time period)

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

timer.hpp:74
void setCallback(TickingGenericCallback callback)

Sets the callback of the timer. Tick callback is still executed every tick. End callback is executed when the timer is stopped.

timer.hpp:81
virtual void onStart() override

Called when the ticking becomes active.

Overrides aurore::Ticking::onStart

timer.hpp:83
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:84

Also the functions of aurore::Ticking (5).

Protected attributes 3

Time period = 0
Time progress = 0
TickingGenericCallback callback = [] {}

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