ADJTIMEX

Section: ¸®´ª½º ÇÁ·Î±×·¥¸Ó ¸Å´º¾ó (2)
Updated: 1997³â 6¿ù 30ÀÏ
Index
Return to Main Contents
 

À̸§

adjtimex - Ä¿³Î Ŭ·°À» Á¶À²ÇÑ´Ù.  

»ç¿ë¹ý

#include <sys/timex.h>

int adjtimex(struct timex *buf);  

¼³¸í

Linux ´Â David L. Mills' ÀÇ Å¬·° Á¶Á¤ ¾Ë°í¸®ÁòÀ» »ç¿ëÇÑ´Ù. adjtimex ´Â ÀÌ ¾Ë°í¸®ÁòÀ¸·Î Á¶Á¤ ÆĶó¹ÌÅ͵éÀ» ÀÐ°í ¼³Á¤ÇÒ¼ö ÀÖ´Ù.

adjtimex ´Â timex ±¸Á¶Ã¼¿¡ ´ëÇÑ Æ÷ÀÎÅ͸¦ °¡Áö°í ÀÖ°í ÇÊµå °ªµéÀ» °¡Áö°í Ä¿³Î ÆĶó¹ÌÅ͵éÀ» °»½ÅÇϸç ÇöÀç Ä¿³Î °ªÀ» °¡Áö°í ÀÖ´Â °°Àº ±¸Á¶Ã¼¸¦ ¹ÝȯÇÑ´Ù. ÀÌ ±¸Á¶Ã¼´Â ´ÙÀ½°ú °°´Ù:

struct timex
{
    int modes;           /* mode selector */
    long offset;         /* time offset (usec) */
    long freq;           /* frequency offset (scaled ppm) */
    long maxerror;       /* maximum error (usec) */
    long esterror;       /* estimated error (usec) */
    int status;          /* clock command/status */
    long constant;       /* pll time constant */
    long precision;      /* clock precision (usec) (read only) */
    long tolerance;      /* clock frequency tolerance (ppm)
                            (read only) */
    struct timeval time; /* current time (read only) */
    long tick;           /* usecs between clock ticks */
};

modes Çʵå´Â ¼³Á¤µÈ ÆĶó¹ÌÅÍ°¡ ¹«¾ùÀÎÁö¸¦ °áÁ¤ÇÑ´Ù. ÀÌ°ÍÀº 0 À̳ª ´ÙÀ½ ºñÆ®µéÀÇ bitwise-or Á¶ÇÕÀ» Æ÷ÇÔÇÑ´Ù.

#define ADJ_OFFSET            0x0001 /* time offset */
#define ADJ_FREQUENCY         0x0002 /* frequency offset */
#define ADJ_MAXERROR          0x0004 /* maximum time error */
#define ADJ_ESTERROR          0x0008 /* estimated time error */
#define ADJ_STATUS            0x0010 /* clock status */
#define ADJ_TIMECONST         0x0020 /* pll time constant */
#define ADJ_TICK              0x4000 /* tick value */
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */

ÀÏ¹Ý À¯Àú´Â mode°¡ 0 °ª¸¸À¸·Î Á¦ÇѵǾî ÀÖ´Ù.

½´ÆÛ À¯Àú¸¸ÀÌ ¾î¶² ÆĶó¹ÌÅ͵鵵 ¼³Á¤ÇÒ¼ö ÀÖ´Ù.
 

¹Ýȯ°ª

¼º°ø½Ã, adjtimex ´Â Ŭ·° »óŸ¦ ¹ÝȯÇÑ´Ù:

#define TIME_OK   0 /* clock synchronized */
#define TIME_INS  1 /* insert leap second */
#define TIME_DEL  2 /* delete leap second */
#define TIME_OOP  3 /* leap second in progress */
#define TIME_WAIT 4 /* leap second has occurred */
#define TIME_BAD  5 /* clock not synchronized */

½ÇÆнÃ, adjtimex ´Â -1À» ¹ÝȯÇÏ°í errno¸¦ ¼³Á¤ÇÑ´Ù.  

¿¡·¯

EFAULT
buf °¡ ¾²±â °¡´ÉÇÑ ¸Þ¸ð¸®¸¦ °¡¸®Å°°í ÀÖÁö ¾Ê´Ù.
EPERM
buf.mode °¡ non-zeroÀÌ°í »ç¿ëÀÚ´Â ½´ÆÛ À¯Àú°¡ ¾Æ´Ï´Ù.
EINVAL
ÀÌ ÇÔ¼ö·Î ÀÎÇÑ ½Ãµµ°¡ -131071 ¿¡¼­ +131071 ¹üÀ§¿ÜÀÇ °ªÀ¸·Î buf.offset ¸¦ ¼³Á¤ÇÏ¿´°Å³ª À§¿¡ ³ª¿­ÇÑ °Íµé ¿ÜÀÇ °ªÀ¸·Î buf.status ¸¦ ¼³Á¤ÇÏ¿´°Å³ª 900000/HZ ¿¡¼­ 1100000/HZ¹üÀ§ ¿ÜÀÇ °ªÀ¸·Î buf.tick ¸¦ ¼³Á¤ÇÏ¿´´Ù. ¿©±â¼­ HZ ´Â ½Ã½ºÅÛ Å¸ÀÌ¸Ó ÀÎÅÍ·´Æ® ÁÖ±âÀÌ´Ù.
 

ȣȯ

adjtimex ´Â ¸®´ª½º¿¡ ÀÇÁ¸Çϸç ȣȯ¼ºÀ» ¿°µÎ¿¡ µÐ ÇÁ·Î±×·¥¿¡¼­´Â »ç¿ëÇؼ­´Â ¾ÈµÈ´Ù. SVr4 ¿¡´Â ºñ½ÁÇÏÁö¸¸ ´ú ÀϹÝÀûÀÎ adjtime ½Ã½ºÅÛ ÇÔ¼ö°¡ ÀÖ´Ù.  

°ü·Ã Ç׸ñ

settimeofday(2)  

¿ªÀÚ

Á¤°­ÈÆ <skyeyes@soback.korent.net>, 2000³â 8¿ù 7ÀÏ


 

Index

À̸§
»ç¿ë¹ý
¼³¸í
¹Ýȯ°ª
¿¡·¯
ȣȯ
°ü·Ã Ç׸ñ
¿ªÀÚ

This document was created by man2html, using the manual pages.
Time: 08:06:59 GMT, March 25, 2004