Skip to content

Commit

Permalink
fix: await 1sec for cpu load
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-shivamsingh committed Jan 23, 2025
1 parent df28236 commit e9f8c38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/monitoring/src/cpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async function getCPULoad() {
const initialCpuUsage = await computeCpuUsageStats();
// wait for 1 second, to connect cpu load for 10^6 micro-second
// ie. 1 second
await new Promise((res) => setTimeout(res(), 1000));
await new Promise((res) => setTimeout(() => res(), 1000));

const finalCpuUsage = await computeCpuUsageStats();

Expand Down

0 comments on commit e9f8c38

Please sign in to comment.