Something lile WinTimer library, but much more
powerfull because it won't rely on the evnt.timer
variable... nor on MU_TIMER event.
Draft of the API:
long Clock(void);
return the current timer value, similar to the clock()
libc function
ClockAdd(app,win,type,value,fn,data);
register a new clock event.
fn is the callback function called when the clock event
occurs. data is the data given to fn().
=> fn(win, clock_value, data, app);
type/value define the clock event to catch:
- CLK_ABSOLUTE/long absolute clock value
- CLK_RELATIVE/clock value relative to now
- CLK_REPEAT/delay (to display a countdown or perform
some garbage stuff f.e.)
ClockRemove() to remove a clock event. Paramters to be
defined.