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