Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Timer

An interface for a Timer class, that abstracts the basic functions of a Timer.

remarks

Implemented by SimpleTimer, SampledTimer, and MultiStageTimer.

internal

Hierarchy

  • Timer

Implemented by

Index

Properties

Methods

Properties

Readonly name

name: string

Optional Readonly value

value: undefined | number

Methods

now

  • now(): number
  • Samples the timer. Requires that the timer has started. This function does not modify the timer's internal state.

    Returns number

    Current timer value. -1 if statistics are disabled.

reset

  • reset(): void

setValue

  • setValue(val: number | undefined): void
  • Sets the measurement value for the amount of time that has elapsed from start() to stop(). Use this function to override the timer's duration.

    Parameters

    • val: number | undefined

      The timer's duration.

    Returns void

start

  • start(): number

stop

  • stop(): number

Generated using TypeDoc