Class: TimerOptions

rune.timer.TimerOptions(data)

The TimerOptions class represents settings that can be sent to a Timer object. The class provides an overview of available settings.

Constructor

new TimerOptions(data)

Creates a new TimerOptions instance.
Parameters:
Name Type Description
data Object Settings data.
Source:

Members

duration :number

The length of the timer object in milliseconds.
Type:
  • number
Default Value:
  • 1000
Source:

(readonly) durationTotal :number

Duration of the timer object including repetitions.
Type:
  • number
Source:

onAbort :function

This method is activated automatically when a Timer object is deleted (via dispose), without being completed first.
Type:
  • function
Source:

onComplete :function

This method is activated automatically when the Timer object is completed. To be "completed", the entire duration, including any repetitions, must come to an end.
Type:
  • function
Source:

onPause :function

This method is activated automatically when the Timer object is paused.
Type:
  • function
Source:

onStart :function

This method is activated automatically when the Timer object is started.
Type:
  • function
Source:

onTick :function

This method is activated automatically when a Timer object reaches the end of its iteration. Example: If a Timer object is repeated once, this method is executed twice.
Type:
  • function
Source:

onUnpause :function

This method is activated automatically when the Timer object is resumed.
Type:
  • function
Source:

onUpdate :function

This method is automatically activated for each tick in which the Timer object is active.
Type:
  • function
Source:

repeat :number

The number of times the timer should be repeated. A setting of 0, means that the timer runs once, but is not repeated.
Type:
  • number
Default Value:
  • 0
Source:

scope :Object

Scope within which callback functions are executed.
Type:
  • Object
Source: