Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ITimerOptions<T>

Construction options for a timer

Type parameters

  • T

Hierarchy

  • ITimerOptions

Index

Properties

Optional breakConditionSearch playground for breakCondition

breakCondition: (data?: ITimerData<T>) => boolean

An optional break condition that will stop the times prematurely. In this case onEnded will not be triggered!

Type declaration

contextObservableSearch playground for contextObservable

contextObservable: Observable<T>

The context observable is used to calculate time deltas and provides the context of the timer's callbacks. Will usually be OnBeforeRenderObservable. Countdown calculation is done ONLY when the observable is notifying its observers, meaning that if you choose an observable that doesn't trigger too often, the wait time might extend further than the requested max time

Optional observableParametersSearch playground for observableParameters

observableParameters: { insertFirst?: boolean; mask?: number; scope?: any }

Optional parameters when adding an observer to the observable

Type declaration

  • Optional insertFirst?: boolean
  • Optional mask?: number
  • Optional scope?: any

Optional onAbortedSearch playground for onAborted

onAborted: (data: ITimerData<any>) => void

Will be triggered when the break condition has met (prematurely ended)

Type declaration

Optional onEndedSearch playground for onEnded

onEnded: (data: ITimerData<any>) => void

Will be triggered when the time condition has met

Type declaration

Optional onTickSearch playground for onTick

onTick: (data: ITimerData<any>) => void

Optional function to execute on each tick (or count)

Type declaration

timeoutSearch playground for timeout

timeout: number

Time-to-end

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method