aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pdumper.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index b51a3797dd4..1c49167e02b 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5388,15 +5388,6 @@ enum dump_section
5388 NUMBER_DUMP_SECTIONS, 5388 NUMBER_DUMP_SECTIONS,
5389 }; 5389 };
5390 5390
5391/* Subtract two timespecs, yielding a difference in milliseconds. */
5392static double
5393subtract_timespec (struct timespec minuend, struct timespec subtrahend)
5394{
5395 return
5396 1000.0 * (double)(minuend.tv_sec - subtrahend.tv_sec)
5397 + (double)(minuend.tv_nsec - subtrahend.tv_nsec) / 1.0e6;
5398}
5399
5400/* Load a dump from DUMP_FILENAME. Return an error code. 5391/* Load a dump from DUMP_FILENAME. Return an error code.
5401 5392
5402 N.B. We run very early in initialization, so we can't use lisp, 5393 N.B. We run very early in initialization, so we can't use lisp,
@@ -5552,8 +5543,11 @@ pdumper_load (const char *dump_filename)
5552 dump_hooks[i] (); 5543 dump_hooks[i] ();
5553 initialized = true; 5544 initialized = true;
5554 5545
5555 dump_private.load_time = subtract_timespec ( 5546 struct timespec load_timespec =
5556 current_timespec (), start_time); 5547 timespec_sub (current_timespec (), start_time);
5548 dump_private.load_time =
5549 (double) load_timespec.tv_sec * 1000.0
5550 + (double) load_timespec.tv_nsec * 0.000001;
5557 dump_private.dump_filename = dump_filename_copy; 5551 dump_private.dump_filename = dump_filename_copy;
5558 dump_filename_copy = NULL; 5552 dump_filename_copy = NULL;
5559 5553