new Timer( [opts])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
opts |
Object |
<optional> |
Object with options as properties:
|
- Source:
- mapspace/time/timer.js
Extends
- ol.Object
Methods
-
check()
-
Checks current setup and updates.
- Source:
- mapspace/time/timer.js
-
getDuration()
-
Return current duration.
- Source:
- mapspace/time/timer.js
Returns:
Duration in milliseconds.
- Type
- number
-
reset()
-
Restarts the execution if set up is ok. The same as start().
- Source:
- mapspace/time/timer.js
-
setDuration(duration)
-
Sets current duration.
Parameters:
Name Type Description duration
number Duration in milliseconds.
- Source:
- mapspace/time/timer.js
-
setup(interval)
-
Setups the function with the given interval.
Parameters:
Name Type Description interval
number Interval in milliseconds between each execution.
- Source:
- mapspace/time/timer.js
-
start()
-
Starts the execution if set up is ok.
- Source:
- mapspace/time/timer.js
-
started()
-
Returns if execution has started.
- Source:
- mapspace/time/timer.js
Returns:
True if started.
- Type
- boolean
-
stop()
-
Stops the execution.
- Source:
- mapspace/time/timer.js