fix bz157, #H4075 - 'realtime' had strange units

A couple of reports asked what weird unit of measure was used for the
'realtime' value in xlogfile.  It was just seconds, but was accumulating
incorrectly whenever game-state got saved for the checkpoint option.
Now it really is seconds, or rather whatever unit you get for the delta
of two time_t values; usually seconds but not guaranteed to be that.
This commit is contained in:
PatR
2015-12-15 17:59:42 -08:00
parent d17fcf3e13
commit 8f96d4b9ef
7 changed files with 29 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 allmain.c $NHDT-Date: 1446975459 2015/11/08 09:37:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.66 $ */
/* NetHack 3.6 allmain.c $NHDT-Date: 1450231173 2015/12/16 01:59:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.67 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -587,18 +587,13 @@ newgame()
com_pager(1);
}
urealtime.realtime = 0L;
urealtime.start_timing = getnow();
#ifdef INSURANCE
save_currentstate();
#endif
program_state.something_worth_saving++; /* useful data now exists */
urealtime.realtime = 0L;
#if defined(BSD) && !defined(POSIX_TYPES)
(void) time((long *) &urealtime.restored);
#else
(void) time(&urealtime.restored);
#endif
/* Success! */
welcome(TRUE);
return;