Added
Link Here
|
1 |
/*- |
2 |
* SPDX-License-Identifier: BSD-3-Clause |
3 |
* |
4 |
* Copyright (c) 1989, 1993 |
5 |
* The Regents of the University of California. All rights reserved. |
6 |
* (c) UNIX System Laboratories, Inc. |
7 |
* All or some portions of this file are derived from material licensed |
8 |
* to the University of California by American Telephone and Telegraph |
9 |
* Co. or Unix System Laboratories, Inc. and are reproduced herein with |
10 |
* the permission of UNIX System Laboratories, Inc. |
11 |
* |
12 |
* Redistribution and use in source and binary forms, with or without |
13 |
* modification, are permitted provided that the following conditions |
14 |
* are met: |
15 |
* 1. Redistributions of source code must retain the above copyright |
16 |
* notice, this list of conditions and the following disclaimer. |
17 |
* 2. Redistributions in binary form must reproduce the above copyright |
18 |
* notice, this list of conditions and the following disclaimer in the |
19 |
* documentation and/or other materials provided with the distribution. |
20 |
* 3. Neither the name of the University nor the names of its contributors |
21 |
* may be used to endorse or promote products derived from this software |
22 |
* without specific prior written permission. |
23 |
* |
24 |
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
25 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
26 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
27 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
28 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
29 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
30 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
31 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
32 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
33 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 |
* SUCH DAMAGE. |
35 |
* |
36 |
* @(#)time.h 8.3 (Berkeley) 1/21/94 |
37 |
*/ |
38 |
|
39 |
#ifndef _SYS_SYS__CLOCK_ID_H |
40 |
#define _SYS_SYS__CLOCK_ID_H |
41 |
|
42 |
/* |
43 |
* These macros are shared between time.h and sys/time.h. |
44 |
*/ |
45 |
#if __POSIX_VISIBLE >= 199506 |
46 |
#define CLOCK_REALTIME 0 |
47 |
#endif /* __POSIX_VISIBLE >= 199506 */ |
48 |
#ifdef __BSD_VISIBLE |
49 |
#define CLOCK_VIRTUAL 1 |
50 |
#define CLOCK_PROF 2 |
51 |
#endif /* __BSD_VISIBLE */ |
52 |
#if __POSIX_VISIBLE >= 200112 |
53 |
#define CLOCK_MONOTONIC 4 |
54 |
#endif /* __POSIX_VISIBLE >= 200112 */ |
55 |
#ifdef __BSD_VISIBLE |
56 |
/* |
57 |
* FreeBSD-specific clocks. |
58 |
*/ |
59 |
#define CLOCK_UPTIME 5 |
60 |
#define CLOCK_UPTIME_PRECISE 7 |
61 |
#define CLOCK_UPTIME_FAST 8 |
62 |
#define CLOCK_REALTIME_PRECISE 9 |
63 |
#define CLOCK_REALTIME_FAST 10 |
64 |
#define CLOCK_MONOTONIC_PRECISE 11 |
65 |
#define CLOCK_MONOTONIC_FAST 12 |
66 |
#define CLOCK_SECOND 13 |
67 |
#endif /* __BSD_VISIBLE */ |
68 |
|
69 |
#if __POSIX_VISIBLE >= 200112 |
70 |
#define CLOCK_THREAD_CPUTIME_ID 14 |
71 |
#define CLOCK_PROCESS_CPUTIME_ID 15 |
72 |
#endif /* __POSIX_VISIBLE >= 200112 */ |
73 |
|
74 |
/* |
75 |
* Linux compatible names. |
76 |
*/ |
77 |
#if __BSD_VISIBLE |
78 |
#define CLOCK_BOOTTIME CLOCK_UPTIME |
79 |
#define CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST |
80 |
#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST |
81 |
#endif |
82 |
|
83 |
#if __BSD_VISIBLE |
84 |
#define TIMER_RELTIME 0x0 /* relative timer */ |
85 |
#endif |
86 |
#if __POSIX_VISIBLE >= 199506 |
87 |
#define TIMER_ABSTIME 0x1 /* absolute timer */ |
88 |
#endif /* __POSIX_VISIBLE >= 199506 */ |
89 |
|
90 |
#endif /* _SYS_SYS__CLOCK_ID_H */ |