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