]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/sys/time.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_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 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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
34 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez
35 * Import of Mac OS X kernel (~semeria)
37 * Revision 1.1.1.1 1998/03/07 02:25:59 wsanchez
38 * Import of OSF Mach kernel (~mburg)
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]
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]
48 * Revision 1.2 1993/04/19 17:17:07 devrcs
50 * [1993/02/26 14:02:46 sp]
52 * Revision 1.1 1992/09/30 02:36:58 robert
59 * Revision 2.3 91/05/14 17:40:25 mrt
60 * Correcting copyright
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]
69 * Mach Operating System
70 * Copyright (c) 1991 Carnegie Mellon University
71 * All Rights Reserved.
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.
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.
83 * Carnegie Mellon requests users of this software to return to
85 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
86 * School of Computer Science
87 * Carnegie Mellon University
88 * Pittsburgh PA 15213-3890
90 * any improvements or extensions that they make and grant Carnegie Mellon rights
91 * to redistribute these changes.
96 * Time-keeper for kernel IO devices.
98 * May or may not have any relation to wall-clock time.
103 #include <mach/time_value.h>
105 extern time_value_t time
;
108 * Definitions to keep old code happy.
110 #define timeval_t time_value_t
111 #define timeval time_value
112 #define tv_sec seconds
113 #define tv_usec microseconds
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_ */