Skip to content

Commit

Permalink
chore: Remove the need for node:process (#8795)
Browse files Browse the repository at this point in the history
performance.now() exist in all envs we support now
  • Loading branch information
jimmywarting authored Jun 22, 2023
1 parent 980b325 commit 7cbd36d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/svelte/src/compiler/Stats.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
const now =
typeof process !== 'undefined' && process.hrtime
? () => {
const t = process.hrtime();
return t[0] * 1e3 + t[1] / 1e6;
}
: () => self.performance.now();
const now = () => performance.now();

/** @param {any} timings */
function collapse_timings(timings) {
Expand Down

0 comments on commit 7cbd36d

Please sign in to comment.