The Timer class provides repetitive and single-shot timers. More...
Signals | |
void | timeout () |
Signal emitted when the timer times out. | |
Public Member Functions | |
void | start (Number aMillisecs) |
Starts or restarts the timer with a timeout interval of msec milliseconds. More... | |
void | stop () |
Stops the timer. | |
Timer () | |
Constructor. | |
Properties | |
Boolean | active |
True if the timer is running. More... | |
Number | interval |
This property holds the timeout interval in milliseconds. More... | |
Boolean | singleShot |
This property holds whether the timer is a single-shot timer. More... | |
The Timer class provides repetitive and single-shot timers.
Example use of the Timer class:
void bps::Timer::start | ( | Number | aMillisecs | ) |
Starts or restarts the timer with a timeout interval of msec milliseconds.
Starts or restarts the timer with the timeout specified in interval if no parameter is passed, or the time passed as parameter. If singleShot is true, the timer will be activated only once.
aMillisecs | Timeout interval. |
|
read |
True if the timer is running.
|
readwrite |
This property holds the timeout interval in milliseconds.
The default value for this property is 0. A Timer with a timeout interval of 0 will time out as soon as all the events in the window system's event queue have been processed.
|
readwrite |
This property holds whether the timer is a single-shot timer.
A single-shot timer fires only once, non-single-shot timers fire every interval milliseconds.