.\" -*- coding: UTF-8 -*- .\" Copyright (c) 2016 by Michael Kerrisk .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH NTP_GETTIME 3 "1 novembre 2020" Linux "Manuel du programmeur Linux" .SH NOM ntp_gettime, ntp_gettimex \- Obtenir des paramètres relatifs au temps (interface du démon NTP) .SH SYNOPSIS .nf \fB#include \fP .PP \fBint ntp_gettime(struct ntptimeval *\fP\fIntv\fP\fB);\fP .PP \fBint ntp_gettimex(struct ntptimeval *\fP\fIntv\fP\fB);\fP .fi .SH DESCRIPTION Ces deux fonctions renvoient des informations à l'appelant à l'aide de l'argument \fIntv\fP, une structure déclarée comme suit\ : .PP .in +4n .EX struct ntptimeval { struct timeval time; /* Heure locale */ long maxerror; /* Erreur maximale */ long esterror; /* Erreur estimée */ long tai; /* Décalage TAI*/ /* Les octets de bourrage suivants autorisent une évolution future */ }; .EE .in .PP Les membres de cette structure sont les suivants\ : .TP \fItime\fP L'heure courante exprimée sous la forme d'une structure de type \fItimeval\fP\ : .IP .in +4n .EX struct timeval { time_t tv_sec; /* Secondes écoulées depuis l'Epoch */ suseconds_t tv_usec; /* Microsecondes */ }; .EE .in .TP \fImaxerror\fP Erreur maximale en microsecondes. Cette valeur peut être initialisée à l'aide de \fBntp_adjtime\fP(3) et est incrémentée périodiquement (chaque seconde sous Linux), mais elle ne peut pas dépasser une limite supérieure (la constante du noyau \fBNTP_PHASE_MAX\fP dont la valeur est 16\ 000). .TP \fIesterror\fP Erreur estimée en microsecondes. Cette valeur peut être définie à l'aide de \fBntp_adjtime\fP(3) pour contenir une estimation de la différence entre l'heure de l'horloge système et l'heure exacte. Cette valeur n'est pas utilisée au sein du noyau. .TP \fItai\fP Décalage avec le TAI (Temps Atomique International). .PP \fBntp_gettime\fP() renvoie une structure de type \fIntptimeval\fP dont elle définit les membres \fItime\fP, \fImaxerror\fP et \fIesterror\fP. .PP \fBntp_gettimex\fP() effectue la même tâche que \fBntp_gettime\fP() mais en plus, elle définit le membre \fItai\fP de la structure de type \fIntptimeval\fP renvoyée. .SH "VALEUR RENVOYÉE" .\" FIXME . the info page incorrectly describes the return values. Les valeurs renvoyées par \fBntp_gettime\fP() et \fBntp_gettimex\fP() sont identiques à celles renvoyées par \fBadjtimex\fP(2). Si le pointeur passé comme argument est correct, ces fonctions s'exécutent toujours avec succès. .SH VERSIONS La fonction \fBntp_gettime\fP() est disponible dans la glibc depuis la version 2.1. La fonction \fBntp_gettimex\fP() est disponible dans la glibc depuis la version 2.12. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lbw30 lb lb l l l. Interface Attribut Valeur T{ \fBntp_gettime\fP(), \fBntp_gettimex\fP() T} Sécurité des threads MT\-Safe .TE .SH CONFORMITÉ La fonction \fBntp_gettime\fP() est décrite dans l'interface de programmation d'application du noyau NTP. \fBntp_gettimex\fP() est une extension GNU. .SH "VOIR AUSSI" \fBadjtimex\fP(2), \fBntp_adjtime\fP(3), \fBtime\fP(7) .PP .ad l .UR http://www.slac.stanford.edu/comp/unix/\:package/\:rtems/\:src/\:ssrlApps/\:ntpNanoclock/\:api.htm NTP "Kernel Application Program Interface" .UE .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot et Lucien Gentis . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .