1 /* clock.h 1.3 86/12/06 */ 2 3 #define SECDAY ((unsigned)(24*60*60)) /* seconds per day */ 4 #define SECYR ((unsigned)(365*SECDAY)) /* per common year */ 5 6 #define YRREF 1970 7 #define LEAPYEAR(year) ((year)%4==0) /* good till time becomes negative */ 8 9 /* 10 * Software clock is software interrupt level 8 11 */ 12 #define setsoftclock() mtpr(SIRR, 0x8) 13 14 /* 15 * To calculate value for interval timer register, we 16 * use the fact that 20512 yields a 60hz clock. 17 */ 18 #define hztocount(v) ((20512*60) / (v)) 19