ntp_gettime(3) - wariua/manpages-ko GitHub Wiki

NAME

ntp_gettime, ntp_gettimex - μ‹œκ°„ λ§€κ°œλ³€μˆ˜ μ–»κΈ° (NTP 데λͺ¬ μΈν„°νŽ˜μ΄μŠ€)

SYNOPSIS

#include <sys/timex.h>

int ntp_gettime(struct ntptimeval *ntv);

int ntp_gettimex(struct ntptimeval *ntv);

DESCRIPTION

이 두 APIλŠ” λͺ¨λ‘ λ‹€μŒ ꡬ쑰체 νƒ€μž…μΈ ntv 인자λ₯Ό 톡해 ν˜ΈμΆœμžμ—κ²Œ 정보λ₯Ό λ°˜ν™˜ν•œλ‹€.

struct ntptimeval {
    struct timeval time;        /* ν˜„μž¬ μ‹œκ°„ */
    long int maxerror;          /* μ΅œλŒ€ 였차 */
    long int esterror;          /* μΆ”μ • 였차 */
    long int tai;               /* TAI μ˜€ν”„μ…‹ */

    /* ν–₯ν›„ ν™•μž₯을 μœ„ν•œ μΆ”κ°€ νŒ¨λ”© λ°”μ΄νŠΈ */
};

이 ꡬ쑰체의 ν•„λ“œλ“€μ€ λ‹€μŒκ³Ό κ°™λ‹€.

maxerror
μ΅œλŒ€ 였차. 마이크둜초 λ‹¨μœ„. ntp_adjtime(3)으둜 이 값을 μ΄ˆκΈ°ν™”ν•  수 있으며, 주기적으둜 (λ¦¬λˆ…μŠ€μ—μ„  λ§€μ΄ˆλ§ˆλ‹€) μ¦κ°€ν•˜λ˜ μƒν•œ(컀널 μƒμˆ˜ NTP_PHASE_MAX, 16,000)이 μžˆλ‹€.
esterror
μΆ”μ • 였차. 마이크둜초 λ‹¨μœ„. μ‹œμŠ€ν…œ 클럭과 μ‹€μ œ μ‹œκ°„μ˜ μΆ”μ‚° 차이λ₯Ό 담도둝 ntp_adjtime(3)으둜 이 값을 μ„€μ •ν•  수 μžˆλ‹€. 이 값은 컀널 내에선 쓰이지 μ•ŠλŠ”λ‹€.
tai
TAI(κ΅­μ œμ›μžμ‹œ) μ˜€ν”„μ…‹.

ntp_gettime()은 ntptimeval ꡬ쑰체의 time, maxerror, esterror ν•„λ“œλ₯Ό μ±„μ›Œμ„œ λ°˜ν™˜ν•œλ‹€.

ntp_gettimex()λŠ” ntp_gettime()κ³Ό 같은 μž‘μ—…μ„ μˆ˜ν–‰ν•˜λ˜ tai ν•„λ“œλ‘œλ„ 정보λ₯Ό λ°˜ν™˜ν•œλ‹€.

RETURN VALUE

ntp_gettime() 및 ntp_gettimex()의 λ°˜ν™˜ 값은 adjtimex(2)μ—μ„œμ™€ κ°™λ‹€. 포인터 μΈμžκ°€ μ˜¬λ°”λ₯΄λ©΄ 이 ν•¨μˆ˜λ“€μ€ 항상 μ„±κ³΅ν•œλ‹€.

VERSIONS

glibc 2.1λΆ€ν„° ntp_gettime() ν•¨μˆ˜κ°€ μ‚¬μš© κ°€λŠ₯ν•˜λ‹€. glibc 2.12λΆ€ν„° ntp_gettimex() ν•¨μˆ˜κ°€ μ‚¬μš© κ°€λŠ₯ν•˜λ‹€.

ATTRIBUTES

이 μ ˆμ—μ„œ μ‚¬μš©ν•˜λŠ” μš©μ–΄λ“€μ— λŒ€ν•œ μ„€λͺ…은 attributes(7)λ₯Ό 보라.

μΈν„°νŽ˜μ΄μŠ€ 속성 κ°’
ntp_gettime(), ntp_gettimex() μŠ€λ ˆλ“œ μ•ˆμ „μ„± MT-Safe

CONFORMING TO

ntp_gettime()은 NTP Kernel Application Program Interface에 기술돼 μžˆλ‹€. ntp_gettimex()λŠ” GNU ν™•μž₯이닀.

SEE ALSO

adjtimex(2), ntp_adjtime(3), time(7)

NTP "Kernel Application Program Interface" (http://www.slac.stanford.edu/comp/unix/package/rtems/src/ssrlApps/ntpNanoclock/api.htm)


2017-09-15

⚠️ **GitHub.com Fallback** ⚠️