-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor fast timers, fix UND_ERR_CONNECT_TIMEOUT on event loop …
…blocking
- Loading branch information
Showing
10 changed files
with
667 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { bench, group, run } from 'mitata' | ||
|
||
group('timers', () => { | ||
bench('Date.now()', () => { | ||
Date.now() | ||
}) | ||
bench('performance.now()', () => { | ||
performance.now() | ||
}) | ||
bench('Math.trunc(performance.now())', () => { | ||
Math.trunc(performance.now()) | ||
}) | ||
bench('process.uptime()', () => { | ||
process.uptime() | ||
}) | ||
}) | ||
|
||
await run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.