Class Timer¶
Defined in File timer.h
Inheritance Relationships¶
Derived Type¶
public PixelMaestro::AnimationTimer(Class AnimationTimer)
Class Documentation¶
- 
class 
Timer¶ Subclassed by PixelMaestro::AnimationTimer
Public Functions
- 
Timer(uint16_t interval = 1000)¶ Constructor. Sets the speed interval.
- Parameters
 interval: Amount of time (in milliseconds) between events.
- 
uint16_t 
get_interval() const¶ Returns the interval between events.
- Return
 Interval.
- 
uint32_t 
get_last_time() const¶ Returns the last update time.
- Return
 Last update time.
- 
void 
set_interval(uint16_t interval)¶ Sets the amount of time between events.
- Parameters
 interval: Amount of time (in milliseconds) between events.
- 
void 
set_last_time(uint32_t last_time = 0)¶ Sets the last time the timer ran.
- Parameters
 last_time: Time (in milliseconds) that the timer last ran.
- 
void 
start()¶ Starts the timer.
- 
void 
stop()¶ Stops the timer.
- 
bool 
update(const uint32_t ¤t_time)¶ Checks if the timer has gone off.
- Return
 If the runtime exceeds the interval, return true.
- Parameters
 current_time: Current program runtime.
-