File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1+ import type { PerformanceEntry } from 'node:perf_hooks' ;
12import process from 'node:process' ;
23import { threadId } from 'node:worker_threads' ;
34
@@ -41,12 +42,11 @@ export function epochClock(init: EpochClockOptions = {}) {
4142 msToUs ( timeOriginMs + perfMs ) ;
4243
4344 const fromEntryStartTimeMs = fromPerfMs ;
44- const fromEntry = ( entry : PerformanceEntry , useEndTime = false ) => {
45- return defaultClock . fromPerfMs (
45+ const fromEntry = ( entry : PerformanceEntry , useEndTime = false ) =>
46+ defaultClock . fromPerfMs (
4647 entry . startTime +
4748 ( entry . entryType === 'measure' && useEndTime ? entry . duration : 0 ) ,
4849 ) ;
49- } ;
5050 const fromDateNowMs = fromEpochMs ;
5151
5252 return {
Original file line number Diff line number Diff line change 11import os from 'node:os' ;
2- import { type PerformanceMark , type PerformanceMeasure } from 'node:perf_hooks' ;
2+ import type { PerformanceMark , PerformanceMeasure } from 'node:perf_hooks' ;
33import { threadId } from 'node:worker_threads' ;
44import { defaultClock } from './clock-epoch.js' ;
55import type {
You can’t perform that action at this time.
0 commit comments