GC debug times are easier to reason about when printed in milliseconds, rather than seconds
@@ -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
}
