Skip to content

Commit

Permalink
fix(core): use Date.now() everywhere for tasks start and end times to…
Browse files Browse the repository at this point in the history
… avoid negative durations (#18595)
  • Loading branch information
AgentEnder authored Aug 15, 2023
1 parent 54ee905 commit 98a7477
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class TaskProfilingLifeCycle implements LifeCycle {
}
for (let t of tasks) {
this.timings[t.id] = {
perfStart: performance.now(),
perfStart: Date.now(),
};
}
}
Expand All @@ -43,7 +43,7 @@ export class TaskProfilingLifeCycle implements LifeCycle {
if (tr.task.endTime) {
this.timings[tr.task.id].perfEnd = tr.task.endTime;
} else {
this.timings[tr.task.id].perfEnd = performance.now();
this.timings[tr.task.id].perfEnd = Date.now();
}
}
this.recordTaskCompletions(taskResults, metadata);
Expand Down

1 comment on commit 98a7477

@vercel
Copy link

@vercel vercel bot commented on 98a7477 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev

Please sign in to comment.