Hierarchy

  • Clock

Constructors

  • Parameters

    • Optional autoStart: boolean

      Automatically start the clock.

    Returns Clock

Properties

autoStart: boolean

If set, starts the clock automatically when the first update is called.

Default

true

elapsedTime: number

When the clock is running, It holds the time elapsed between the start of the clock to the previous update. This parameter is in seconds of three decimal places.

Default

0

oldTime: number

When the clock is running, It holds the previous time from a update. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

Default

0

running: boolean

This property keeps track whether the clock is running or not.

Default

false

startTime: number

When the clock is running, It holds the starttime of the clock. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

Default

0

Methods

  • Get the seconds passed since the last call to this method.

    Returns number

  • Get the seconds passed since the clock started.

    Returns number

  • Starts clock.

    Returns void

  • Stops clock.

    Returns void

Generated using TypeDoc