d8ab9809ec216b899352a752bccceef406286a30
* Copyright (c) 1988 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* @(#)clock.h 7.2 (Berkeley) %G%
#define SECDAY ((unsigned)(24*60*60)) /* seconds per day */
#define SECYR ((unsigned)(365*SECDAY)) /* per common year */
#define LEAPYEAR(year) ((year)%4==0) /* good till time becomes negative */
* Software clock is software interrupt level 8
#define setsoftclock() mtpr(SIRR, 0x8)
* To calculate value for interval timer register, we
* use the fact that 20512 yields a 60hz clock.
#define hztocount(v) ((20512*60) / (v))