# TimePoint
Creates a time point object
# Constructor
constructor( elapsed: i64 = 0 )
elapsed
- Time in microseconds since epoch
Example:
import { TimePoint } from 'proton-tsc'
const tp = new TimePoint(5)
// tp.elapsed.count() == 5
# Fields
- Represents microseconds elapsed since epoch
var elapsed: Microseconds
# Instance Methods
function timeSinceEpoch(): i64
Time in microseconds elapsed since epoch
function msSinceEpoch(): i64
Time in milliseconds elapsed since epoch
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