export class TimePeriod { public startTimestamp : number ; public endTimestamp : number ; constructor ( ) { this . startTimestamp = performance . now ( ) ; } public markComplete ( ) { this . endTimestamp = performance . now ( ) ; } public getElapsedTime ( ) { return this . endTimestamp ? this . endTimestamp - this . startTimestamp : 0 ; } }