File too/Timer


class too.Timer

Instances of the Timer class provide, in conjunction with the RunLoop, event scheduling functionality. Timer objects can fire once or repeatedly.

Because the trigger time of a Timer can change, in case of repeated firing, a Timer is not a tom.Date: a Timer represents a moment in time like a tom.Date, but a tom.Date is assumed to be constant.

Inherits

State supers
tom.HeapElement

methods

instance (id)
  withInterval double secs
    invocation tom.Invocation invocation
      repeats: boolean repeats_p = NO
pre
  secs > 0.0 || !repeats_p && !secs;
Undocumented.

instance too.Timer

variables

public double fire_time;
The next (relative) moment in time we will fire.
public double period;
The repetition period. This is 0.0 for a single-shot timer.
tom.Invocation invocation;
The invocation to fire when we do.

methods

id (self)
  initWithFireTime double d
        invocation tom.Invocation i
           period: double p = 0.0
pre
  p >= 0.0;
Designated initializer. If the time d lies in the past, the timer will fire as soon as possible.

void
  fire;
Undocumented.

tom.OutputStream (s)
  writeFields tom.OutputStream s;
Undocumented.

void
  cancel
pre
  [self scheduled];
Cancel this timer with the current RunLoop. It must be scheduled with that RunLoop.

void
  schedule
pre
  ![self scheduled];
Schedule this timer with the current RunLoop. The timer may not already be scheduled.

boolean
  scheduled;
Return whether this timer is currently scheduled.

int
  compare id other;

Comparable


Generated by tm 1.01.