modernc.org/cc@v1.0.1/v2/headers/linux_arm/usr/include/arm-linux-gnueabihf/bits/time.h (about) 1 /* System-dependent timing definitions. Linux version. 2 Copyright (C) 1996-2016 Free Software Foundation, Inc. 3 This file is part of the GNU C Library. 4 5 The GNU C Library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 The GNU C Library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with the GNU C Library; if not, see 17 <http://www.gnu.org/licenses/>. */ 18 19 /* 20 * Never include this file directly; use <time.h> instead. 21 */ 22 23 #if defined __need_timeval || defined __USE_GNU 24 #ifndef _STRUCT_TIMEVAL 25 #define _STRUCT_TIMEVAL 1 26 #include <bits/types.h> 27 28 /* A time value that is accurate to the nearest 29 microsecond but also has a range of years. */ 30 struct timeval { 31 __time_t tv_sec; /* Seconds. */ 32 __suseconds_t tv_usec; /* Microseconds. */ 33 }; 34 #endif /* struct timeval */ 35 #endif 36 37 #ifndef __need_timeval 38 #ifndef _BITS_TIME_H 39 #define _BITS_TIME_H 1 40 41 /* ISO/IEC 9899:1999 7.23.1: Components of time 42 The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is 43 the number per second of the value returned by the `clock' function. */ 44 /* CAE XSH, Issue 4, Version 2: <time.h> 45 The value of CLOCKS_PER_SEC is required to be 1 million on all 46 XSI-conformant systems. */ 47 #define CLOCKS_PER_SEC ((clock_t) 1000000) 48 49 #if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \ 50 && !defined __USE_XOPEN2K 51 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK 52 presents the real value for clock ticks per second for the system. */ 53 #include <bits/types.h> 54 extern long int __sysconf(int); 55 #define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ 56 #endif 57 58 #ifdef __USE_POSIX199309 59 /* Identifier for system-wide realtime clock. */ 60 #define CLOCK_REALTIME 0 61 /* Monotonic system-wide clock. */ 62 #define CLOCK_MONOTONIC 1 63 /* High-resolution timer from the CPU. */ 64 #define CLOCK_PROCESS_CPUTIME_ID 2 65 /* Thread-specific CPU-time clock. */ 66 #define CLOCK_THREAD_CPUTIME_ID 3 67 /* Monotonic system-wide clock, not adjusted for frequency scaling. */ 68 #define CLOCK_MONOTONIC_RAW 4 69 /* Identifier for system-wide realtime clock, updated only on ticks. */ 70 #define CLOCK_REALTIME_COARSE 5 71 /* Monotonic system-wide clock, updated only on ticks. */ 72 #define CLOCK_MONOTONIC_COARSE 6 73 /* Monotonic system-wide clock that includes time spent in suspension. */ 74 #define CLOCK_BOOTTIME 7 75 /* Like CLOCK_REALTIME but also wakes suspended system. */ 76 #define CLOCK_REALTIME_ALARM 8 77 /* Like CLOCK_BOOTTIME but also wakes suspended system. */ 78 #define CLOCK_BOOTTIME_ALARM 9 79 /* Like CLOCK_REALTIME but in International Atomic Time. */ 80 #define CLOCK_TAI 11 81 82 /* Flag to indicate time is absolute. */ 83 #define TIMER_ABSTIME 1 84 #endif 85 86 #ifdef __USE_GNU 87 #include <bits/timex.h> 88 89 __BEGIN_DECLS 90 /* Tune a POSIX clock. */ 91 extern int clock_adjtime(__clockid_t __clock_id, struct timex *__utx) __THROW; 92 93 __END_DECLS 94 #endif /* use GNU */ 95 #endif /* bits/time.h */ 96 #endif 97 #undef __need_timeval