elapsed time handling
The code has been assuming that time_t is some number of seconds. That's valid for traditional Unix systems and for Posix compliant systems but is not something guaranteed by the C standard. (We ran into a long time ago when trying out an alternate way to calculate phase of moon. That code made a similar assumption and broke one of the ports.) 'ubirthday' also warrants being re-done but I've run out of energy.
This commit is contained in:
@@ -1273,7 +1273,7 @@ really_done(int how)
|
||||
topten figure it out separately and possibly getting different
|
||||
time or even day if player is slow responding to --More-- */
|
||||
urealtime.finish_time = endtime = getnow();
|
||||
urealtime.realtime += (long) (endtime - urealtime.start_timing);
|
||||
urealtime.realtime += timet_delta(endtime, urealtime.start_timing);
|
||||
/* collect these for end of game disclosure (not used during play) */
|
||||
iflags.at_night = night();
|
||||
iflags.at_midnight = midnight();
|
||||
|
||||
Reference in New Issue
Block a user