xref: /csrg-svn/sys/tahoe/include/clock.h (revision 30257)
1*30257Ssam /*	clock.h	1.3	86/12/06	*/
224011Ssam 
324011Ssam #define	SECDAY		((unsigned)(24*60*60))		/* seconds per day */
424011Ssam #define	SECYR		((unsigned)(365*SECDAY))	/* per common year */
524011Ssam 
624011Ssam #define	YRREF		1970
724011Ssam #define	LEAPYEAR(year)	((year)%4==0)	/* good till time becomes negative */
824011Ssam 
924011Ssam /*
1024011Ssam  * Software clock is software interrupt level 8
1124011Ssam  */
1225678Ssam #define	setsoftclock()	mtpr(SIRR, 0x8)
13*30257Ssam 
14*30257Ssam /*
15*30257Ssam  * To calculate value for interval timer register, we
16*30257Ssam  * use the fact that 20512 yields a 60hz clock.
17*30257Ssam  */
18*30257Ssam #define	hztocount(v)	((20512*60) / (v))
19