# TimePointSec

Creates a time point seconds object

# Constructors

  • constructor(
      public utcSeconds: u32 = 0
    )
    
    utcSeconds - Time in seconds since epoch

Example:

  import { TimePointSec } from 'proton-tsc'

  const tp = new TimePointSec(5)
  // tp.utcSeconds == 5
  • static fromTimePoint(t: TimePoint): TimePointSec
    

    Creates a TimePointSec object from a precise TimePoint

# Static Methods

  • static function maximum(): TimePointSec
    

    Returns maximum seconds of 0xffffffff (4294967295)

  • static function min(): TimePointSec
    

    Returns minimum seconds of 0

# Instance Methods

  • function secSinceEpoch(): u32
    

    Time in seconds elapsed since epoch

  • function toString(): string
    

    Returns string representation of number of microseconds since epoch

# Static Math and Equality methods

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

    Adds two time point values

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

    Substracts two time point values

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

    Multiplies two time point values

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

    Divides two time point values

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

    Checks that the amounts of two time point values are equal

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

    Checks that the amounts of two time point values are not equal

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

    Checks that the microseconds since epoch of a is less than b

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

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

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

    Checks that the microseconds since epoch of a is greater than b

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

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