Redirect Notice

Redirect Notice

The page you requested has been relocated to Player Docs.

akamai.amp~TimerGroup

The TimerGroup class.

Constructor

TimerGroup

new TimerGroup(id)

Create a TimerGroup

Parameters
Name Type Description
id string

The timer group's id.

Methods

clearGroup

clearGroup(id)

Clears a timer group

Parameters
Name Type Description
id string

The timer group id

clearImmediate

clearImmediate(id)

Cancels an action which was previously established by a call to setImmediate().

Parameters
Name Type Description
id number

The interval id

clearInterval

clearInterval(id)

Cancels a timed, repeating action which was previously established by a call to setInterval().

Parameters
Name Type Description
id number

The interval id

clearTimeout

clearTimeout(id)

Cancels a timed action which was previously established by a call to setTimeout().

Parameters
Name Type Description
id number

The interval id

clearTimer

clearTimer(timer)

Clears a timer object

Parameters
Name Type Description
timer akamai.amp.Timer

The timer

destroy

destroy()

Destroys the TimerGroup

setGroup

setGroup(id) → {akamai.amp.TimerGroup}

Creates a timer group.

Parameters
Name Type Description
id string

The timer group id

Returns
akamai.amp.TimerGroup

The timer group

setImmediate

setImmediate(func) → {number}

Calls a function at the next available interval. It returns an ID which can be used to remove it later by calling clearImmediate().

Parameters
Name Type Description
func function

The function to call

Returns
number

The timeout ID

setInterval

setInterval(func, delay) → {number}

Repeatedly calls a function with a fixed time delay between each call. It returns an ID which uniquely identifies the interval, so you can remove it later by calling clearInterval().

Parameters
Name Type Description
func function

The function to call

delay number

The delay in milliseconds

Returns
number

The interval ID

setTimeout

setTimeout(func, delay) → {number}

Calls a function with at a fixed time delay. It returns an ID which can be used to remove it later by calling clearTimeout().

Parameters
Name Type Description
func function

The function to call

delay number

The delay in milliseconds

Returns
number

The timeout ID

setTimer

setTimer(delay, repeatCount) → {akamai.amp.Timer}

Creates a timer object.

Parameters
Name Type Description
delay number

The delay in milliseconds

repeatCount number

The the number of times the timer "ticks" or repeats

Returns
akamai.amp.Timer

The timer