Function: ScheduleTimer Purpose: Register a function to be called whenever a specified time interval has elapsed. Category: SYSTEM File: events.src Author: J.P. Terlouw Use: #include "events.h" ident id; id = ScheduleTimer(proc, interval, arg); void(*proc)() - pointer to function. int interval - time interval in milliseconds. void *arg - 'client' data Description: ScheduleTimer registers a function to be called by MainLoop whenever a specified interval in milliseconds has expired. Until it is descheduled, 'proc' will be called every 'interval' milliseconds. In the call 'arg' is passed as an argument. The return value is a unique identification code corresponding with the registration, which will also be passed as an argument to 'proc'. The prototype of 'proc' is: void proc(ident id, void arg); The header file contains a number of convenient definitions for units of time, e.g., "5 MINUTES" is equivalent to 300000 milliseconds. See events.h. Warning: this software resembles the old Patriot missile control software: 24 days, 20 hours, 31 minutes and 23.647 seconds after starting MainLoop, the internal timer will overflow. Related Docs: events.dc3, ScheduleWrite.dc3, ScheduleRead.dc3, Deschedule.dc3, DescheduleAll.dc3, MainLoop.dc2, AttachXt.dc2. Updates: Apr 8, 1997: JPT Document created.