mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
GC debug times are easier to reason about when printed in milliseconds, rather than seconds
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user