Class: TaskLooper

TaskLooper(fn)

Run a task in a fixed period loop.

Constructor

new TaskLooper(fn)

Build the looper with a function to invoke on a fixed period loop.
Parameters:
Name Type Description
fn function the function to invoke
Source:

Methods

setPeriodInMs(periodInMs)

Set the loop period in milliseconds.
Parameters:
Name Type Description
periodInMs int the loop period in milliseconds
Source:

start(periodInMs)

Start the task loop.
Parameters:
Name Type Description
periodInMs int the loop period in milliseconds
Source:

stop()

Stop the task loop.
Source: