Commit 52172d23 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix gc-elapsed rounding bug

* src/alloc.c (garbage_collect): Don’t accumulate rounding
errors when computing gc-elapsed.
parent 1acc0cc9
Pipeline #3132 passed with stage
in 54 minutes and 11 seconds
......@@ -6021,9 +6021,10 @@ garbage_collect (void)
/* Accumulate statistics. */
if (FLOATP (Vgc_elapsed))
struct timespec since_start = timespec_sub (current_timespec (), start);
Vgc_elapsed = make_float (XFLOAT_DATA (Vgc_elapsed)
+ timespectod (since_start));
static struct timespec gc_elapsed;
gc_elapsed = timespec_add (gc_elapsed,
timespec_sub (current_timespec (), start));
Vgc_elapsed = make_float (timespectod (gc_elapsed));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment