|
Packit |
6c4009 |
/* System-dependent timing definitions. Generic version.
|
|
Packit |
6c4009 |
Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; if not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/*
|
|
Packit |
6c4009 |
* Never include this file directly; use <time.h> instead.
|
|
Packit |
6c4009 |
*/
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifndef _BITS_TIME_H
|
|
Packit |
6c4009 |
#define _BITS_TIME_H 1
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <bits/types.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* ISO/IEC 9899:1999 7.23.1: Components of time
|
|
Packit |
6c4009 |
The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
|
|
Packit |
6c4009 |
the number per second of the value returned by the `clock' function. */
|
|
Packit |
6c4009 |
/* CAE XSH, Issue 4, Version 2: <time.h>
|
|
Packit |
6c4009 |
The value of CLOCKS_PER_SEC is required to be 1 million on all
|
|
Packit |
6c4009 |
XSI-conformant systems. */
|
|
Packit |
6c4009 |
#define CLOCKS_PER_SEC ((__clock_t) 1000000)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \
|
|
Packit |
6c4009 |
&& !defined __USE_XOPEN2K
|
|
Packit |
6c4009 |
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
|
|
Packit |
6c4009 |
presents the real value for clock ticks per second for the system. */
|
|
Packit |
6c4009 |
extern long int __sysconf (int);
|
|
Packit |
6c4009 |
# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#ifdef __USE_POSIX199309
|
|
Packit |
6c4009 |
/* Identifier for system-wide realtime clock. */
|
|
Packit |
6c4009 |
# define CLOCK_REALTIME 0
|
|
Packit |
6c4009 |
/* Monotonic system-wide clock. */
|
|
Packit |
6c4009 |
# define CLOCK_MONOTONIC 1
|
|
Packit |
6c4009 |
/* High-resolution timer from the CPU. */
|
|
Packit |
6c4009 |
# define CLOCK_PROCESS_CPUTIME_ID 2
|
|
Packit |
6c4009 |
/* Thread-specific CPU-time clock. */
|
|
Packit |
6c4009 |
# define CLOCK_THREAD_CPUTIME_ID 3
|
|
Packit |
6c4009 |
/* Monotonic system-wide clock, not adjusted for frequency scaling. */
|
|
Packit |
6c4009 |
# define CLOCK_MONOTONIC_RAW 4
|
|
Packit |
6c4009 |
/* Identifier for system-wide realtime clock, updated only on ticks. */
|
|
Packit |
6c4009 |
# define CLOCK_REALTIME_COARSE 5
|
|
Packit |
6c4009 |
/* Monotonic system-wide clock, updated only on ticks. */
|
|
Packit |
6c4009 |
# define CLOCK_MONOTONIC_COARSE 6
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Flag to indicate time is absolute. */
|
|
Packit |
6c4009 |
# define TIMER_ABSTIME 1
|
|
Packit |
6c4009 |
#endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* bits/time.h */
|