public export class Time { public static of ( epoch ) { return new Time ( epoch ) ; } public static now ( ) { return this . of ( Date . now ( ) ) ; } private readonly _epoch : number ; constructor ( epoch ) { this . _epoch = epoch ; } public get epoch ( ) : number { return this . _epoch ; } public elapsed ( now = Date . now ( ) ) { return now - this . _epoch ; } }