public interface Timer
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Stops the timer.
|
void |
create()
Creates the timer.
|
boolean |
isActive()
Tells whether or not the timer is active.
|
boolean |
isSingleShot()
Returns whether or not the timer is scheduled to be executed only once.
|
long |
period()
Returns the timer period in milliseconds.
|
void |
run()
Runs the timer according to
period() . |
void |
run(long period)
Calls
setPeriod(long) followed by run() . |
void |
setPeriod(long period)
Defines the timer period in milliseconds.
|
void |
setSingleShot(boolean singleShot)
Defines the timer as a single shot or for repeated execution.
|
void |
stop()
Stops the timer.
|
Taskable |
timingTask()
Returns the object defining the timer callback method.
|
void run(long period)
setPeriod(long)
followed by run()
.period
- time in milliseconds between successive task executionsvoid run()
period()
. The timer may be scheduled for
repeated fixed-rate execution according to isSingleShot()
.Taskable timingTask()
void stop()
void cancel()
void create()
boolean isActive()
long period()
void setPeriod(long period)
boolean isSingleShot()
void setSingleShot(boolean singleShot)
Processing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia