Classes

Method Thread():setInterval() Foundation

Sets the time interval for restarting a thread.

Syntax
:setInterval( <nHSeconds>|NIL ) --> lSuccess
Parameters
<nHSeconds>
<nHSeconds> indicates the time interval in 1/100ths of a second after which a thread is automatically restarted. The value of <nHSeconds> is stored in the :interval instance variable. Passing the value NIL voids a previously set interval.
Description

The method :setInterval() defines a time interval. When it expires, the Thread object automatically restarts the thread and executes the program code specified to the :start() method. If the value of <nHSeconds> is smaller than the required execution time of the thread, it is restarted as soon as the thread has finished code execution. Each time the thread begins executing code, the instance variable :startCount is incremented by 1. The thread remains active until the time interval is set to NIL. After that, the thread is terminated.

The time interval after which the thread is restarted can deviate from the value <nHSeconds>. The actual achieved time interval is stored in the instance variable :deltaTime.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.