version 1.8 | | version 1.9 |
---|
| | |
/* | | /* |
* static char *rcsid_time_c = | | * static char *rcsid_time_c = |
* "$Id: time.c,v 1.8 2001/12/18 08:58:03 garbled Exp $"; | | * "$Id: time.c,v 1.9 2001/12/19 21:03:44 garbled Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
get_tod(timeofday_t *tod) | | get_tod(timeofday_t *tod) |
{ | | { |
tod->year = todtick/HOURS_PER_YEAR; | | tod->year = todtick/HOURS_PER_YEAR; |
tod->month = todtick/HOURS_PER_MONTH; | | tod->month = (todtick/HOURS_PER_MONTH)%MONTHS_PER_YEAR; |
tod->day = (todtick%HOURS_PER_MONTH)/DAYS_PER_MONTH; | | tod->day = (todtick%HOURS_PER_MONTH)/DAYS_PER_MONTH; |
tod->dayofweek = tod->day%DAYS_PER_WEEK; | | tod->dayofweek = tod->day%DAYS_PER_WEEK; |
tod->hour = todtick%HOURS_PER_DAY; | | tod->hour = todtick%HOURS_PER_DAY; |