]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/sys/timex.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sys / timex.h
CommitLineData
b168057a 1/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
8a4b65b4
UD
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8a4b65b4
UD
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
8a4b65b4 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
28f540f4 17
267ca16a 18#ifndef _SYS_TIMEX_H
267ca16a 19#define _SYS_TIMEX_H 1
267ca16a 20
cbdee279 21#include <features.h>
267ca16a 22#include <sys/time.h>
c3c95a7b 23
1c376f5b 24/* These definitions from linux/timex.h as of 2.6.30. */
c3c95a7b 25
83fe108b
UD
26#include <bits/timex.h>
27
eb415739
UD
28#define NTP_API 4 /* NTP API version */
29
997d6467
UD
30struct ntptimeval
31{
32 struct timeval time; /* current time (ro) */
33 long int maxerror; /* maximum error (us) (ro) */
34 long int esterror; /* estimated error (us) (ro) */
eb415739
UD
35 long int tai; /* TAI offset (ro) */
36
d1d9eaf4
OB
37 long int __glibc_reserved1;
38 long int __glibc_reserved2;
39 long int __glibc_reserved3;
40 long int __glibc_reserved4;
997d6467
UD
41};
42
c3c95a7b
UD
43/* Clock states (time_state) */
44#define TIME_OK 0 /* clock synchronized, no leap second */
45#define TIME_INS 1 /* insert leap second */
46#define TIME_DEL 2 /* delete leap second */
47#define TIME_OOP 3 /* leap second in progress */
48#define TIME_WAIT 4 /* leap second has occurred */
49#define TIME_ERROR 5 /* clock not synchronized */
50#define TIME_BAD TIME_ERROR /* bw compat */
28f540f4 51
d328b80b
UD
52/* Maximum time constant of the PLL. */
53#define MAXTC 6
54
d2f5be2a
UD
55__BEGIN_DECLS
56
4d3a563f
UD
57extern int __adjtimex (struct timex *__ntx) __THROW;
58extern int adjtimex (struct timex *__ntx) __THROW;
d2f5be2a 59
5b08ac57
AS
60#ifdef __REDIRECT_NTH
61extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
62 ntp_gettimex);
eb415739
UD
63#else
64extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
65# define ntp_gettime ntp_gettimex
66#endif
4d3a563f 67extern int ntp_adjtime (struct timex *__tntx) __THROW;
997d6467 68
d2f5be2a
UD
69__END_DECLS
70
71#endif /* sys/timex.h */