Options
All
  • Public
  • Public/Protected
  • All
Menu

TimeUnitValue allows for passing around a reference to a changeable measure of time coerced by its unit type.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _quantity

_quantity: number

Protected _total

Private _units

_units: TimeUnit

Accessors

direction

  • get direction(): number
  • +1, 0, or -1 depending on the time direction.

    Returns number

total

units

  • Returns TimeUnit

value

  • get value(): number
  • set value(v: number): void
  • Returns number

  • Parameters

    • v: number

    Returns void

Methods

compareTo

  • Compares this instance against any other time quantity instance.

    Parameters

    Returns number

equals

  • Compares this instance against any other time quantity instance and return true if the amount of time is the same.

    Parameters

    Returns boolean

getTotal

  • Returns the total amount of time measured in the requested TimeUnit.

    Parameters

    Returns number

getTotalMilliseconds

  • getTotalMilliseconds(): number

to

  • Parameters

    • Default value units: TimeUnit = this.units

    Returns TimeUnitValue

Static from

Generated using TypeDoc