Timer (of Object
)¶
-
class
Timer
¶ Defined in Timer.sc.
A timer class that can count down in ticks, milliseconds, seconds, minutes or hours.
Example usage:
; Make a timer to cue() the current object in 3 seconds ((Timer new:) set: self 3)
Properties¶
Inherited from Object
:
Property | Description |
---|---|
name |
Defined in Timer:
Property | Description |
---|---|
cycleCnt | |
seconds | |
ticks | |
lastTime | |
client |
Methods¶
-
new
()
-
init
(theClient)
-
doit
()
-
dispose
()
-
set
(theClient theSeconds [theMinutes theHours]) Sets the timer.
Parameters: - theClient (heapPtr) – This object will have its cue() method called when the timer expires.
- theSeconds (number) – The number of seconds for the timer.
- theMinutes (number) – The number of minutes for the timer (optional).
- theHours (number) – The number of hours for the timer (optional).
-
setCycle
(theCycler sendParams)
-
setReal
(theClient theMilliseconds [theSeconds theMinutes]) Sets the timer. This is more precise than set(), because you can specify milliseconds.
Parameters: - theClient (heapPtr) – This object will have its cue() method called when the timer expires.
- theMilliseconds (number) – The number of seconds for the timer.
- theSeconds (number) – The number of seconds for the timer.
- theMinutes (number) – The number of minutes for the timer (optional).
-
delete
()
-
setTicks
(param1 param2)