Skip to content

Commit af7647f

Browse files
author
John Doe
committed
refactor: wip
1 parent 81bac90 commit af7647f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/utils/src/lib/clock-epoch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { PerformanceEntry } from 'node:perf_hooks';
12
import process from 'node:process';
23
import { 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 {

packages/utils/src/lib/trace-file-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os from 'node:os';
2-
import { type PerformanceMark, type PerformanceMeasure } from 'node:perf_hooks';
2+
import type { PerformanceMark, PerformanceMeasure } from 'node:perf_hooks';
33
import { threadId } from 'node:worker_threads';
44
import { defaultClock } from './clock-epoch.js';
55
import type {

0 commit comments

Comments
 (0)