Class Stopwatch

The Stopwatch represents a time measuring device in real-time.

The Stopwatch class does not measure simulation or engine time. It measures the absolute time of the runtime environment.

Constructors

Accessors

  • get elapsedTicks(): number
  • Gets the ticks since starting the stopwatch.

    Returns number

    a tick represents 100 nanoseconds.

  • get elapsedTime(): number
  • Gets the time in milliseconds since starting the stopwatch.

    Returns number

  • get elapsedTimeInNanoseconds(): number
  • Gets the time in milliseconds since starting the stopwatch.

    Returns number

  • get elapsedTimeInSeconds(): number
  • Gets the time in seconds since starting the stopwatch.

    Returns number

  • get isRunning(): boolean
  • Determines if the stopwatch is running.

    Returns boolean

Methods

  • Restarts the stopwatch.

    Returns void

  • Starts the stopwatch.

    Returns void

  • Starts the stopwatch.

    Returns void