* When the delay indicated by the timer expires, the timer
* device will execute the event associated with it.
*
+ * You should not call this function on an already running timer.
+ *
* \note Interrupt safe
*/
void timer_add(Timer *timer)
event_initSoftint(&timer->expire, func, user_data);
}
-/** Set the timer delay (the time before the event will be triggered) */
+/**
+ * Set the timer delay (the time before the event will be triggered)
+ *
+ * \note It's illegal to change the delay of the timer when it's
+ * still running.
+ */
INLINE void timer_setDelay(Timer *timer, ticks_t delay)
{
timer->_delay = delay;