* mps/code/global.c (ArenaStep): Fix calculation of available time.

This commit is contained in:
Helmut Eller 2025-09-08 18:18:12 +02:00
parent 4fa84f64e4
commit b38d8789fe

View file

@ -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);