Timerclass provide, in conjunction with the
RunLoop, event scheduling functionality.
Timerobjects can fire once or repeatedly.
Because the trigger time of a
Timer can change, in case of repeated
Timer is not a
Timer represents a moment in
time like a
tom.Date, but a
tom.Date is assumed to be constant.
instance (id) withInterval double secs invocation tom.Invocation invocation repeats: boolean repeats_p = NO pre secs > 0.0 || !repeats_p && !secs;
public double fire_time;
public double period;
id (self) initWithFireTime double d invocation tom.Invocation i period: double p = 0.0 pre p >= 0.0;
dlies in the past, the timer will fire as soon as possible.
tom.OutputStream (s) writeFields tom.OutputStream s;
void cancel pre [self scheduled];
RunLoop. It must be scheduled with that
void schedule pre ![self scheduled];
RunLoop. The timer may not already be scheduled.
int compare id other;