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:
PatR
2021-08-25 14:14:23 -07:00
parent 52f5e79790
commit b1f3d1f864
5 changed files with 28 additions and 7 deletions

View File

@@ -18,15 +18,16 @@ extern char *fmt_ptr(const void *);
/* ### allmain.c ### */
extern void early_init(void);
extern void moveloop_core(void);
extern void moveloop(boolean);
extern void stop_occupation(void);
extern void display_gamewindows(void);
extern void newgame(void);
extern void welcome(boolean);
extern time_t get_realtime(void);
extern int argcheck(int, char **, enum earlyarg);
extern void early_init(void);
extern long timet_to_seconds(time_t);
extern long timet_delta(time_t, time_t);
/* ### apply.c ### */