WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Interfaces

Functions

Functions

interval

  • interval(callback: function, delay?: number, time?: number): Timer
  • Schedules and returns a new timer, invoking the specified callback repeatedly every 'delay' milliseconds until the timer is stopped. The callback is passed the (apparent) elapsed time since the timer became active.

    Parameters

    • callback: function

      A callback function to be invoked and passed in the apparent elapsed time since the timer became active in milliseconds.

        • (elapsed: number): void
        • Parameters

          • elapsed: number

          Returns void

    • Optional delay: number

      An optional numeric delay in milliseconds between repeat invocations of the callback. If not specified, the interval timer behaves like the regular timer.

    • Optional time: number

      An optional time in milliseconds relative to which the initial delay is calculated (default = now).

    Returns Timer

now

  • now(): number
  • Returns the current time as defined by performance.now if available, and Date.now if not. The current time is updated at the start of a frame; it is thus consistent during the frame, and any timers scheduled during the same frame will be synchronized. If this method is called outside of a frame, such as in response to a user event, the current time is calculated and then fixed until the next frame, again ensuring consistent timing during event handling.

    Returns number

timeout

  • timeout(callback: function, delay?: number, time?: number): Timer
  • Schedules and returns a new timer, invoking the specified callback. The timer is stopped automatically on its first callback. The callback is passed the (apparent) elapsed time since the timer became active.

    Parameters

    • callback: function

      A callback function to be invoked and passed in the apparent elapsed time since the timer became active in milliseconds.

        • (elapsed: number): void
        • Parameters

          • elapsed: number

          Returns void

    • Optional delay: number

      An optional numeric delay in milliseconds (default = 0) relative to time.

    • Optional time: number

      An optional time in milliseconds relative to which the delay is calculated (default = now).

    Returns Timer

timer

  • timer(callback: function, delay?: number, time?: number): Timer
  • Schedules and returns a new timer, invoking the specified callback repeatedly until the timer is stopped. The callback is passed the (apparent) elapsed time since the timer became active.

    Parameters

    • callback: function

      A callback function to be invoked and passed in the apparent elapsed time since the timer became active in milliseconds.

        • (elapsed: number): void
        • Parameters

          • elapsed: number

          Returns void

    • Optional delay: number

      An optional numeric delay in milliseconds (default = 0) relative to time.

    • Optional time: number

      An optional time in milliseconds relative to which the delay is calculated (default = now).

    Returns Timer

timerFlush

  • timerFlush(): void
  • Immediately invoke any eligible timer callbacks

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc