-
<protected> _clearTimeout() → {Object}
-
Cancel execution of scheduled action.
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
<protected> _setTimeout() → {Object}
-
Schedule related action execution.
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
dispose()
-
Free resources that are allocated for object.
- Source:
-
execute() → {Object}
-
Execute related action (function).
Schedules next execution if action should be executed repeatedly.
The timer instance to which the action is associated will be passed as function's parameter.
- Source:
- See:
-
Returns:
Reference to this
object.
-
Type
-
Object
-
getAction() → {Function}
-
Return function that represents action.
- Source:
Returns:
Function that represents action.
-
Type
-
Function
-
getPeriod() → {Integer}
-
Return time period that is used to schedule related action execution.
- Source:
Returns:
Time period in milliseconds.
-
Type
-
Integer
-
isActive() → {Boolean}
-
Test whether timer is in use.
- Source:
Returns:
true
, if timer is in use, otherwise false
.
-
Type
-
Boolean
-
isRecurrent() → {Boolean}
-
Test whether related action should be executed repeatedly.
- Source:
Returns:
true
, if related action should be executed repeatedly, otherwise false
.
-
Type
-
Boolean
-
setAction(action) → {Object}
-
Set function which represents action that should be executed after time period is elapsed.
Parameters:
Name |
Type |
Description |
action |
Function
|
Function that represents action. |
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
setActive(bActive) → {Object}
-
Set or cancel timer usage.
Depending of this schedules related action execution or cancels action execution.
Consecutive calling with bActive = true
leads to related action execution delaying.
Parameters:
Name |
Type |
Description |
bActive |
Boolean
|
true to schedule related action execution, false to cancel action execution. |
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
setPeriod(nPeriod) → {Object}
-
Set time period that is used to schedule related action execution.
Parameters:
Name |
Type |
Description |
nPeriod |
Integer
|
Time period in milliseconds. |
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
setRecurrent(bRecurrent) → {Object}
-
Set or cancel repeating of related action execution.
Parameters:
Name |
Type |
Description |
bRecurrent |
Boolean
|
true , if action should be executed repeatedly, false , if action repeating should be off. |
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
start(nPeriod) → {Object}
-
Start timer usage (make it active).
Parameters:
Name |
Type |
Argument |
Description |
nPeriod |
Integer
|
<optional>
|
Time period in milliseconds that is used to schedule related action execution (new value for period property).
The current value of period property is used by default. |
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
stop() → {Object}
-
Stop timer usage (make it inactive).
- Source:
Returns:
Reference to this
object.
-
Type
-
Object
-
toString()
-
Convert object into string.
- Source: