From b38d8789fe0a13ad493ee5798e86bf65533d4e00 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Mon, 8 Sep 2025 18:18:12 +0200 Subject: [PATCH] * mps/code/global.c (ArenaStep): Fix calculation of available time. --- mps/code/global.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mps/code/global.c b/mps/code/global.c index 6c7cd39b941..fbf9f5c5492 100644 --- a/mps/code/global.c +++ b/mps/code/global.c @@ -789,8 +789,9 @@ Bool ArenaStep(Globals globals, double interval, double multiplier) trace = ArenaTrace(arena, (TraceId)0); } else { /* No traces are running: consider collecting the world. */ - if (PolicyShouldCollectWorld(arena, (double)(availableEnd - now), now, - clocks_per_sec)) + if (PolicyShouldCollectWorld(arena, + (double)(availableEnd - now)/clocks_per_sec, + now, clocks_per_sec)) { Res res; res = TraceStartCollectAll(&trace, arena, TraceStartWhyOPPORTUNISM);