Skip to content

Commit 98a7477

Browse files
authored
fix(core): use Date.now() everywhere for tasks start and end times to avoid negative durations (#18595)
1 parent 54ee905 commit 98a7477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nx/src/tasks-runner/life-cycles/task-profiling-life-cycle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class TaskProfilingLifeCycle implements LifeCycle {
2727
}
2828
for (let t of tasks) {
2929
this.timings[t.id] = {
30-
perfStart: performance.now(),
30+
perfStart: Date.now(),
3131
};
3232
}
3333
}
@@ -43,7 +43,7 @@ export class TaskProfilingLifeCycle implements LifeCycle {
4343
if (tr.task.endTime) {
4444
this.timings[tr.task.id].perfEnd = tr.task.endTime;
4545
} else {
46-
this.timings[tr.task.id].perfEnd = performance.now();
46+
this.timings[tr.task.id].perfEnd = Date.now();
4747
}
4848
}
4949
this.recordTaskCompletions(taskResults, metadata);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy