22#include "../engine.hpp"
Complete engine containing all engine components.
Definition engine.hpp:41
Measurement
Time measurement.
Definition time.hpp:39
Calls a function after a given time.
Definition invocation.hpp:68
Engine & engine
Parent Engine.
Definition invocation.hpp:69
long m_timePassed
How much time (in microseconds) actually passed since invocation started until now (if active),...
Definition invocation.hpp:72
void Invoke(long time, Measurement measurement)
Invoke your callback function.
Definition invocation.cpp:82
void Cancel()
Cancel the current invocation.
Definition invocation.cpp:92
~Invocation()
Safely deregister invocation from Time.
Definition invocation.cpp:40
std::function< bool()> m_callback
Function to invoke.
Definition invocation.hpp:70
bool m_active
Whether currently invoked (true: invoked, false: stationary).
Definition invocation.hpp:71
long m_duration
How much time (in microseconds) should pass before your function gets called (if active),...
Definition invocation.hpp:73