]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify pdumper-load via timespectod
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Jan 2019 20:48:42 +0000 (12:48 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Jan 2019 20:49:00 +0000 (12:49 -0800)
Suggested by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2019-01/msg00458.html
* src/pdumper.c (pdumper_load): Simplify.

src/pdumper.c

index e57aa8f2a03ccb1b8ce0afcaa8f1ef523dd4d4dd..6be26dc8168b22edb8c699bded70e3bd3c56a7cb 100644 (file)
@@ -5545,10 +5545,7 @@ pdumper_load (const char *dump_filename)
 
   struct timespec load_timespec =
     timespec_sub (current_timespec (), start_time);
-  ALLOW_IMPLICIT_CONVERSION;
-  double s = load_timespec.tv_sec, ns = load_timespec.tv_nsec;
-  DISALLOW_IMPLICIT_CONVERSION;
-  dump_private.load_time = (s * 1e9 + ns) / 1e9;
+  dump_private.load_time = timespectod (load_timespec);
   dump_private.dump_filename = dump_filename_copy;
   dump_filename_copy = NULL;