]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/sys/time.h
f2fa500d9a0b83206079e453979bfa21c7390f97
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
28 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez
29 * Import of Mac OS X kernel (~semeria)
31 * Revision 1.1.1.1 1998/03/07 02:25:59 wsanchez
32 * Import of OSF Mach kernel (~mburg)
34 * Revision 1.2.6.1 1994/09/23 03:13:17 ezf
35 * change marker to not FREE
36 * [1994/09/22 21:58:56 ezf]
38 * Revision 1.2.2.2 1993/06/09 02:55:33 gm
39 * Added to OSF/1 R1.3 from NMK15.0.
40 * [1993/06/02 21:31:02 jeffc]
42 * Revision 1.2 1993/04/19 17:17:07 devrcs
44 * [1993/02/26 14:02:46 sp]
46 * Revision 1.1 1992/09/30 02:36:58 robert
53 * Revision 2.3 91/05/14 17:40:25 mrt
54 * Correcting copyright
56 * Revision 2.2 91/02/05 17:56:58 mrt
57 * Changed to new Mach copyright
58 * [91/02/01 17:49:29 mrt]
63 * Mach Operating System
64 * Copyright (c) 1991 Carnegie Mellon University
65 * All Rights Reserved.
67 * Permission to use, copy, modify and distribute this software and its
68 * documentation is hereby granted, provided that both the copyright
69 * notice and this permission notice appear in all copies of the
70 * software, derivative works or modified versions, and any portions
71 * thereof, and that both notices appear in supporting documentation.
73 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
74 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
75 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
77 * Carnegie Mellon requests users of this software to return to
79 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
80 * School of Computer Science
81 * Carnegie Mellon University
82 * Pittsburgh PA 15213-3890
84 * any improvements or extensions that they make and grant Carnegie Mellon rights
85 * to redistribute these changes.
90 * Time-keeper for kernel IO devices.
92 * May or may not have any relation to wall-clock time.
97 #include <mach/time_value.h>
99 extern time_value_t time
;
102 * Definitions to keep old code happy.
104 #define timeval_t time_value_t
105 #define timeval time_value
106 #define tv_sec seconds
107 #define tv_usec microseconds
109 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
110 #define timercmp(tvp, uvp, cmp) \
111 ((tvp)->tv_sec cmp (uvp)->tv_sec || \
112 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
113 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
114 #endif /* _SYS_TIME_H_ */