export class Timer { public timeMs ? : number ; private startTime : number ; constructor ( ) { this . startTime = Date . now ( ) ; } public start ( ) { this . startTime = Date . now ( ) ; } public end ( ) { this . timeMs = ( Date . now ( ) - this . startTime ) / 1000 ; } public display ( ) { return this . timeMs ? `${ this . timeMs }ms` : '???' ; } }