Skip to content

Commit 7cbd36d

Browse files
authored
chore: Remove the need for node:process (#8795)
performance.now() exist in all envs we support now
1 parent 980b325 commit 7cbd36d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/svelte/src/compiler/Stats.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
const now =
2-
typeof process !== 'undefined' && process.hrtime
3-
? () => {
4-
const t = process.hrtime();
5-
return t[0] * 1e3 + t[1] / 1e6;
6-
}
7-
: () => self.performance.now();
1+
const now = () => performance.now();
82

93
/** @param {any} timings */
104
function collapse_timings(timings) {

0 commit comments

Comments
 (0)