run prettier
This commit is contained in:
parent
2034b970b6
commit
7db2eda76c
101 changed files with 1810 additions and 1405 deletions
|
@ -1,12 +1,12 @@
|
|||
import chalk from 'chalk'
|
||||
import pretty from 'pretty-time'
|
||||
import chalk from "chalk"
|
||||
import pretty from "pretty-time"
|
||||
|
||||
export class PerfTimer {
|
||||
evts: { [key: string]: [number, number] }
|
||||
|
||||
constructor() {
|
||||
this.evts = {}
|
||||
this.addEvent('start')
|
||||
this.addEvent("start")
|
||||
}
|
||||
|
||||
addEvent(evtName: string) {
|
||||
|
@ -14,6 +14,6 @@ export class PerfTimer {
|
|||
}
|
||||
|
||||
timeSince(evtName?: string): string {
|
||||
return chalk.yellow(pretty(process.hrtime(this.evts[evtName ?? 'start'])))
|
||||
return chalk.yellow(pretty(process.hrtime(this.evts[evtName ?? "start"])))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue