/*
 * @DEC_COPYRIGHT@
 */
/*
 * HISTORY
 * $Log:	clock.h,v $
 * Revision 1.1.3.2  91/11/20  13:34:22  Hal_Project
 * 	Moved from dec/machine/mips; pool reorg.
 * 	[91/11/18  00:16:43  Donald_Dutile]
 * 
 * Revision 4.2  91/09/19  23:10:51  devbld
 * 	Adding ODE Headers
 * 
 * $EndLog$
 */
/*	
 *	@(#)$RCSfile: clock.h,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 91/11/20 13:34:22 $
 */ 
/*
 */
/*
 * (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
 * ALL RIGHTS RESERVED
 */
/*
 * OSF/1 Release 1.0
 */
/*
 * derived from clock.h	2.1	(ULTRIX)	6/7/90 
 */
/* ------------------------------------------------------------------------
 * Modification History:
 *
 * 12-Sep-1990	burns
 *	First hack at moving to OSF/1 (snap3). Added ifdef'd clkwrap
 *	macro.
 *
 * 19-Jun-85 -- jaw
 *	VAX8200 name change.
 *
 * 7 JAN 85 -- jaw
 *	Add support for VAX8200.
 *
 * ------------------------------------------------------------------------
 */


/*
 * VAX clock registers
 */

#define	ICCS_RUN	0x00000001
#define	ICCS_TRANS	0x00000010
#define	ICCS_SS		0x00000020
#define	ICCS_IE		0x00000040
#define	ICCS_INT	0x00000080
#define	ICCS_ERR	0x80000000
	
/*
 * General time definitions
 */
#define	SECMIN	((unsigned)60)			/* seconds per minute */
#define	SECHOUR	((unsigned)(60*SECMIN))		/* seconds per hour */
#define	SECDAY	((unsigned)(24*SECHOUR))	/* seconds per day */
#define	SECYR	((unsigned)(365*SECDAY))	/* sec per reg year */

#define	YRREF		1970
#define	LEAPYEAR(year)	((year)%4==0)	/* good till time becomes negative */
#define	BASEYEAR	72			/* MUST be a leap year */


/* - burns - taken from ka650.h
 * Bits in TCR0/TCR1: Programable Timer Control Registers (cvqssc->cvq4_tcrx)
 * (The rest of the bits are the same as in the standard VAX
 *  Interval timer and are defined in clock.h)
 */
#define TCR_STP 0x00000004		/* <2>  Stop after time-out */
