# Class: TaskLooper

## TaskLooper(task)

Run a task in a fixed period loop.

## Constructor

#### new TaskLooper(task)

Build the looper with a function to invoke on a fixed period loop.

##### Parameters:

Name | Type | Description
--- | --- | ---
`task` | function | the task function to invoke

Source:
  - src/main/js/common/TaskLooper.js, line 4

### Methods

#### getTask() → {function}

Get the task function to invoke on a fixed period loop.

Source:
  - src/main/js/common/TaskLooper.js, line 20

##### Returns:

the task function

Type
  function

#### isStarted() → {boolean}

Indicates if looping.

Source:
  - src/main/js/common/TaskLooper.js, line 45

##### Returns:

true if looping, false otherwise

Type
  boolean

#### setPeriodInMs(periodInMs)

Set the loop period in milliseconds.

##### Parameters:

Name | Type | Description
--- | --- | ---
`periodInMs` | int | the loop period in milliseconds

Source:
  - src/main/js/common/TaskLooper.js, line 61

#### start(periodInMs) → {TaskLooper}

Start the task loop.

##### Parameters:

Name | Type | Description
--- | --- | ---
`periodInMs` | int | the loop period in milliseconds

Source:
  - src/main/js/common/TaskLooper.js, line 30

##### Returns:

this class for chaining

Type
  TaskLooper

#### stop()

Stop the task loop.

Source:
  - src/main/js/common/TaskLooper.js, line 52