Code for Class SwatchEngine
*-- Method SwatchEngine.Init()
this.nstart = 0
this.Interval = 0
this.nSecs = 0
this.nLast = 0
*-- Method SwatchEngine.Time()
LOCAL lnSeconds
lnSeconds = SECONDS()
this.nSecs = this.nSecs + (lnSeconds - this.nLast)
this.nLast = lnSeconds
*-- Method SwatchEngine.Start()
this.nstart = SECONDS()
this.nLast = this.nStart
this.nSecs = 0
this.Interval = 200
*-- Method SwatchEngine.Stop()
this.timer()
this.Interval = 0
this.nLast = 0
*-- Method SwatchEngine.Pause()
this.timer()
this.interval = 0
*-- Method SwatchEngine.Resume()
If this.nLast = 0 && Clock was stopped
this.nLast = SECONDS() && Pick up from now
this.interval = 200
ELSE
this.interval = 200
ENDIF