1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28/*
29 * @OSF_COPYRIGHT@
30 */
31/*
32 * HISTORY
33 *
34 * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
35 * Import of Mac OS X kernel (~semeria)
36 *
37 * Revision 1.1.1.1  1998/03/07 02:25:59  wsanchez
38 * Import of OSF Mach kernel (~mburg)
39 *
40 * Revision 1.2.6.1  1994/09/23  03:13:17  ezf
41 * 	change marker to not FREE
42 * 	[1994/09/22  21:58:56  ezf]
43 *
44 * Revision 1.2.2.2  1993/06/09  02:55:33  gm
45 * 	Added to OSF/1 R1.3 from NMK15.0.
46 * 	[1993/06/02  21:31:02  jeffc]
47 *
48 * Revision 1.2  1993/04/19  17:17:07  devrcs
49 * 	Fixes for ANSI C
50 * 	[1993/02/26  14:02:46  sp]
51 *
52 * Revision 1.1  1992/09/30  02:36:58  robert
53 * 	Initial revision
54 *
55 * $EndLog$
56 */
57/* CMU_HIST */
58/*
59 * Revision 2.3  91/05/14  17:40:25  mrt
60 * 	Correcting copyright
61 *
62 * Revision 2.2  91/02/05  17:56:58  mrt
63 * 	Changed to new Mach copyright
64 * 	[91/02/01  17:49:29  mrt]
65 *
66 */
67/* CMU_ENDHIST */
68/*
69 * Mach Operating System
70 * Copyright (c) 1991 Carnegie Mellon University
71 * All Rights Reserved.
72 *
73 * Permission to use, copy, modify and distribute this software and its
74 * documentation is hereby granted, provided that both the copyright
75 * notice and this permission notice appear in all copies of the
76 * software, derivative works or modified versions, and any portions
77 * thereof, and that both notices appear in supporting documentation.
78 *
79 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
80 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
81 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
82 *
83 * Carnegie Mellon requests users of this software to return to
84 *
85 *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
86 *  School of Computer Science
87 *  Carnegie Mellon University
88 *  Pittsburgh PA 15213-3890
89 *
90 * any improvements or extensions that they make and grant Carnegie Mellon rights
91 * to redistribute these changes.
92 */
93/*
94 */
95/*
96 *	Time-keeper for kernel IO devices.
97 *
98 *	May or may not have any relation to wall-clock time.
99 */
100
101#ifndef _SYS_TIME_H_
102#define _SYS_TIME_H_
103#include <mach/time_value.h>
104
105extern time_value_t	time;
106
107/*
108 * Definitions to keep old code happy.
109 */
110#define timeval_t time_value_t
111#define timeval time_value
112#define	tv_sec	seconds
113#define	tv_usec	microseconds
114
115#define timerisset(tvp)		((tvp)->tv_sec || (tvp)->tv_usec)
116#define timercmp(tvp, uvp, cmp)	\
117	((tvp)->tv_sec cmp (uvp)->tv_sec || \
118	 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
119#define timerclear(tvp)		(tvp)->tv_sec = (tvp)->tv_usec = 0
120#endif /* _SYS_TIME_H_ */
121