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