Represent logged in time in seconds rather than minutes

This simplifies things.  In particular, it gets rid of random rounding
in getcommand(), which created a variation in the nightly build
depending on whether the update starts before or after the deity logs
out.

Replace struct natstr member nat_minused by nat_timeused, and update
cou_ca[] accordingly (this affects xdump nat).  Replace player member
minleft by timeleft, and getminleft() by gettimeleft().  Update
getcommand(), daychange(), player_main(), status() accordingly, taking
care not to change player output.  Change edit country key 'u' to work
in seconds.
This commit is contained in:
Ron Koenderink 2008-10-28 08:48:25 -06:00
parent 436328f641
commit 14319b89ec
10 changed files with 40 additions and 42 deletions

View file

@ -67,8 +67,8 @@ struct player {
char *argp[128]; /* arguments, ASCII, valid if command */
char *condarg; /* conditional, ASCII, valid if command */
char *comtail[128]; /* start of args in combuf[] */
time_t lasttime; /* when minleft was last debited */
int minleft;
time_t lasttime; /* when timeleft was last debited */
int timeleft;
int btused;
int god;
int owner;