aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-01-19 20:21:25 +0200
committerEli Zaretskii2019-01-19 20:21:25 +0200
commit8e2b2a2b179c3ed170ad9de32a320e788c6a3a5e (patch)
treed1a4a22f645482cd266cd429bdfbe670474abe10
parent8bb5939efaf61eb0dc944eff5023d3f2e6ff85a7 (diff)
downloademacs-8e2b2a2b179c3ed170ad9de32a320e788c6a3a5e.tar.gz
emacs-8e2b2a2b179c3ed170ad9de32a320e788c6a3a5e.zip
Minor cleanup in pdumper.c
* src/pdumper (subtract_timespec): Function removed. (pdumper_load): Use timespec_sub instead of subtract_timespec.
-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