GC debug times are easier to reason about when printed in milliseconds, rather than seconds

This commit is contained in:
underscorediscovery
2020-07-18 20:50:26 -07:00
parent b279e51fd1
commit dead8df82e

View File

@ -188,12 +188,12 @@ void wrenCollectGarbage(WrenVM* vm)
double elapsed = ((double)clock() / CLOCKS_PER_SEC) - startTime;
// Explicit cast because size_t has different sizes on 32-bit and 64-bit and
// we need a consistent type for the format string.
printf("GC %lu before, %lu after (%lu collected), next at %lu. Took %.3fs.\n",
printf("GC %lu before, %lu after (%lu collected), next at %lu. Took %.3fms.\n",
(unsigned long)before,
(unsigned long)vm->bytesAllocated,
(unsigned long)(before - vm->bytesAllocated),
(unsigned long)vm->nextGC,
elapsed);
elapsed*1000.0);
#endif
}