3 * - By John Hodge (thePowersGang)
8 #ifndef _KERNEL_TIMERS_H_
9 #define _KERNEL_TIMERS_H_
12 * \brief Kernel timers
15 typedef struct sTimer tTimer;
18 * \brief Timer callback function
20 typedef void (tTimerCallback)(void *);
23 * \brief Creates a one-shot timer
24 * \param Delta Period of the timer
25 * \param Callback Function to call each time
26 * \param Argument Argument to pass to the callback
28 extern tTimer *Time_CreateTimer(int Delta, tTimerCallback *Callback, void *Argument) DEPRECATED;
31 * \brief Allocate (but don't schedule) a timer object
32 * \param Callback Function to call (if NULL, EVENT_TIMER is delivered to the current thread)
33 * \param Argument Argument passed to \a Callback (ignored if \a Callback is NULL)
34 * \return New timer pointer
36 extern tTimer *Time_AllocateTimer(tTimerCallback *Callback, void *Argument);
39 * \brief Free an allocated timer object
40 * \param Timer Object pointer returned by Time_AllocateTimer
42 extern void Time_FreeTimer(tTimer *Timer);
45 * \brief Schedules a timer to fire in \a Delta ms
46 * \param Timer Timer object returned by Time_AllocateTimer
47 * \param Delta Time until timer fires (in milliseconds)
49 extern void Time_ScheduleTimer(tTimer *Timer, int Delta);
52 * \brief Removed an active timer
54 extern void Time_RemoveTimer(tTimer *Timer);
57 * \brief Wait for a period of milliseconds
59 extern void Time_Delay(int Delay);