Skip to content

Commit

Permalink
Add check to prevent adding idle dummy if runId is
Browse files Browse the repository at this point in the history
not -1
  • Loading branch information
stirante committed Dec 5, 2023
1 parent 21a92e7 commit c435af2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/profilingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let runId = -1;
* The call that was chosen to be the dummy function is `system.currentTick`.
*/
export function addIdleDummy() {
if (runId !== -1) return;
runId = system.runInterval(idle, 1);
}

Expand Down

0 comments on commit c435af2

Please sign in to comment.