Exemple #1
0
 /// <summary>
 /// Registers an one-shot timer, which will be fired after
 /// the specified time span.
 /// </summary>
 public void RegisterOneShot(ClockHandler handler, TimeLength time)
 {
     Debug.Assert(time.TotalSeconds > 0);
     oneshotQueue.Add(this + time, handler);
 }
Exemple #2
0
 public RepeatedTimer(Clock _clock, ClockHandler _handler, TimeLength first, TimeLength _interval)
 {
     this.clock    = _clock;
     this.handler  = _handler;
     this.interval = _interval;
     clock.RegisterOneShot(new ClockHandler(onClock), first);
 }