From c435af24075b9d8ca2c22558639ce632c408b522 Mon Sep 17 00:00:00 2001 From: stirante Date: Tue, 5 Dec 2023 20:17:02 +0100 Subject: [PATCH] Add check to prevent adding idle dummy if runId is not -1 --- src/profilingUtils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/profilingUtils.ts b/src/profilingUtils.ts index 3aad403..9a5952d 100644 --- a/src/profilingUtils.ts +++ b/src/profilingUtils.ts @@ -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); }