diff options
| author | Paul Eggert | 2019-01-19 14:38:52 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-01-19 14:39:16 -0800 |
| commit | 3e1255172334f3c0645d37eb92c05a628fa3d548 (patch) | |
| tree | 4c62eb68bff62b5e6a23b9e5d5ea5347db593eef /src | |
| parent | b821a70cb9467186afb55734a0e5cb4601909916 (diff) | |
| download | emacs-3e1255172334f3c0645d37eb92c05a628fa3d548.tar.gz emacs-3e1255172334f3c0645d37eb92c05a628fa3d548.zip | |
pdumper-stats now returns s, not ms
* doc/lispref/internals.texi (pdumper-stats):
* src/pdumper.c (pdumper_load): Return seconds, not milliseconds.
Minimize rounding errors in the usual case.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pdumper.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pdumper.c b/src/pdumper.c index 19a21329b1e..4bbeabb828e 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -5545,9 +5545,10 @@ pdumper_load (const char *dump_filename) | |||
| 5545 | 5545 | ||
| 5546 | struct timespec load_timespec = | 5546 | struct timespec load_timespec = |
| 5547 | timespec_sub (current_timespec (), start_time); | 5547 | timespec_sub (current_timespec (), start_time); |
| 5548 | dump_private.load_time = | 5548 | ALLOW_IMPLICIT_CONVERSION; |
| 5549 | (double) load_timespec.tv_sec * 1000.0 | 5549 | double s = load_timespec.tv_sec, ns = load_timespec.tv_nsec; |
| 5550 | + (double) load_timespec.tv_nsec * 0.000001; | 5550 | DISALLOW_IMPLICIT_CONVERSION; |
| 5551 | dump_private.load_time = (s * 1e9 + ns) / 1e9; | ||
| 5551 | dump_private.dump_filename = dump_filename_copy; | 5552 | dump_private.dump_filename = dump_filename_copy; |
| 5552 | dump_filename_copy = NULL; | 5553 | dump_filename_copy = NULL; |
| 5553 | 5554 | ||
| @@ -5569,7 +5570,7 @@ the return value is an alist of the form: | |||
| 5569 | 5570 | ||
| 5570 | ((dumped-with-pdumper . t) (load-time . TIME) (dump-file-name . FILE)) | 5571 | ((dumped-with-pdumper . t) (load-time . TIME) (dump-file-name . FILE)) |
| 5571 | 5572 | ||
| 5572 | where TIME is the time in milliseconds it took to restore Emacs state | 5573 | where TIME is the time in seconds it took to restore Emacs state |
| 5573 | from the dump file, and FILE is the name of the dump file. | 5574 | from the dump file, and FILE is the name of the dump file. |
| 5574 | Value is nil if this session was not started using a portable dump file.*/) | 5575 | Value is nil if this session was not started using a portable dump file.*/) |
| 5575 | (void) | 5576 | (void) |