Options
All
  • Public
  • Public/Protected
  • All
Menu

TimeDelayedAction provides a wrapper around a setTimeout() function call that makes it easy to stop and reset.

Hierarchy

  • TimeDelayedAction

Index

Constructors

Properties

Methods

Constructors

constructor

  • new TimeDelayedAction(delayMS: number, func: function, functionContext: any): TimeDelayedAction
  • Initializes a new instance of the {@link geocortex.framework.utils.TimeDelayedAction} class. You must call the start method to start the timer. It does not auto-start.

    Parameters

    • delayMS: number

      The number of milliseconds until the function is executed.

    • func: function

      The function to execute after the time has ellapsed.

        • (): void
        • Returns void

    • functionContext: any

      Provides the value of the this variable in the function callback.

    Returns TimeDelayedAction

Properties

delayMS

delayMS: number

The amount of delay before the function is called.

Methods

reset

  • reset(): void
  • Restarts the timer.

    Returns void

start

  • start(): void
  • Starts the timer.

    Returns void

stop

  • stop(): void
  • Stops the timer.

    Returns void