mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-06 18:20:17 +00:00
Update heap.c
This commit is contained in:
parent
d03610071a
commit
272388ed8f
@ -40,12 +40,12 @@ static void ManagedHeap__fire_debug_callback(ManagedHeap* self, ManagedHeapSwpet
|
|||||||
c11_sbuf buf;
|
c11_sbuf buf;
|
||||||
c11_sbuf__ctor(&buf);
|
c11_sbuf__ctor(&buf);
|
||||||
|
|
||||||
const int64_t NANOS_PER_SEC = 1000000000;
|
const int64_t NANOS_PER_MS = 1000000000 / 1000;
|
||||||
const char* DIVIDER = "------------------------------------------------------------\n";
|
const char* DIVIDER = "------------------------------------------------------------\n";
|
||||||
|
|
||||||
double start = out_info->start_ns / 1e9;
|
double start = out_info->start_ns / 1e9;
|
||||||
int64_t mark_ms = (out_info->mark_end_ns - out_info->start_ns) / NANOS_PER_SEC;
|
int64_t mark_ms = (out_info->mark_end_ns - out_info->start_ns) / NANOS_PER_MS;
|
||||||
int64_t swpet_ms = (out_info->swpet_end_ns - out_info->mark_end_ns) / NANOS_PER_SEC;
|
int64_t swpet_ms = (out_info->swpet_end_ns - out_info->mark_end_ns) / NANOS_PER_MS;
|
||||||
|
|
||||||
c11_sbuf__write_cstr(&buf, DIVIDER);
|
c11_sbuf__write_cstr(&buf, DIVIDER);
|
||||||
pk_sprintf(&buf, "start: %f\n", (double)start / 1000);
|
pk_sprintf(&buf, "start: %f\n", (double)start / 1000);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user