from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

210252

userrating:


May 25th. 2007:
Words

486

Views

259197

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

150569

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





ntp_gettime

Section: C Library Functions (3)
Updated: 202-0-08
Index Return to Main Contents
 

NAME

ntp_gettime, ntp_gettimex - get time parameters (NTP daemon interface)  

LIBRARY

Standard C library (libc,~-lc)  

SYNOPSIS

#include <sys/timex.h>
int ntp_gettime(struct ntptimeval *ntv);
int ntp_gettimex(struct ntptimeval *ntv);
 

DESCRIPTION

Both of these APIs return information to the caller via the ntv argument, a structure of the following type: struct ntptimeval {
    struct timeval time;    /* Current time */
    long maxerror;          /* Maximum error */
    long esterror;          /* Estimated error */
    long tai;               /* TAI offset */
    /* Further padding bytes allowing for future expansion */ }; The fields of this structure are as follows:
time
The current time, expressed as a timeval structure:
struct timeval {
    time_t      tv_sec;   /* Seconds since the Epoch */
    suseconds_t tv_usec;  /* Microseconds */ };
maxerror
Maximum error, in microseconds. This value can be initialized by ntp_adjtime(3), and is increased periodically (on Linux: each second), but is clamped to an upper limit (the kernel constant NTP_PHASE_MAX, with a value of 16,000).
esterror
Estimated error, in microseconds. This value can be set via ntp_adjtime(3) to contain an estimate of the difference between the system clock and the true time. This value is not used inside the kernel.
tai
TAI (Atomic International Time) offset. ntp_gettime() returns an ntptimeval structure in which the time, maxerror, and esterror fields are filled in. ntp_gettimex() performs the same task as ntp_gettime(), but also returns information in the tai field.
 

RETURN VALUE

The return values for ntp_gettime() and ntp_gettimex() are as for adjtimex(2). Given a correct pointer argument, these functions always succeed.  

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
ntp_gettime(), ntp_gettimex() Thread safetyM-Safe
 

STANDARDS

ntp_gettime()
NTP Kernel Application Program Interface.
ntp_gettimex()
GNU.
 

HISTORY

ntp_gettime()
glibc 2.1.
ntp_gettimex()
glibc 2.12.
 

SEE ALSO

adjtimex(2), ntp_adjtime(3), time(7) NTP "Kernel Application Program Interface"


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ATTRIBUTES
STANDARDS
HISTORY
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 14.4 ms