Menu

#10 Add ClockXxx() functions to manage multiple timers

open
nobody
None
5
2006-03-06
2006-03-06
No

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.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.