# Microseconds

Creates a microseconds time object

# Constructor

  • constructor(
      public _count: i64 = 0
    )
    
    _count - Time in microseconds

Example:

  import { Microseconds } from 'proton-tsc'

  const ms5 = new Microseconds(5)
  // ms5.count() == 5

# Static Methods

  • static function maximum(): Microseconds
    

    Returns maximum microseconds of 0x7FFFFFFFFFFFFFFF (9223372036854775807)

# Instance Methods

  • function toTimePoint(): TimePoint
    

    Converts microseconds to a TimePoint object

  • function toSeconds(): i64
    

    Converts microseconds to seconds

  • function count(): i64
    

    Helper getter method to return internal _count

  • function toString(): string
    

    Returns string representation of number of microseconds

# Static Math and Equality methods

  • static function add(a: Microseconds, b: Microseconds): Microseconds
    

    Adds two microsecond values

  • static function sub(a: Microseconds, b: Microseconds): Microseconds
    

    Substracts two microsecond values

  • static function mul(a: Microseconds, b: Microseconds): Microseconds
    

    Multiplies two microsecond values

  • static function div(a: Microseconds, b: Microseconds): Microseconds
    

    Divides two microsecond values

  • static function eq(a: Microseconds, b: Microseconds): bool
    

    Checks that the amounts of two microsecond values are equal

  • static function neq(a: Microseconds, b: Microseconds): bool
    

    Checks that the amounts of two microsecond values are not equal

  • static function lt(a: Microseconds, b: Microseconds): bool
    

    Checks that the microseconds of a is less than b

  • static function lte(a: Microseconds, b: Microseconds): bool
    

    Checks that the microseconds of a is less than or equal to b

  • static function gt(a: Microseconds, b: Microseconds): bool
    

    Checks that the microseconds of a is greater than b

  • static function gte(a: Microseconds, b: Microseconds): bool
    

    Checks that the microseconds of a is greater than or equal to b