adj_timex调用不起作用

时间:2016-04-12 11:45:36

标签: linux time linux-kernel debian-based

adjtimex似乎对系统时间没有任何影响。

我正在运行Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.65-1+deb7u2。停止了ntp,并运行了以下多次,仍然找不到任何时间拉。如果有人可以解决这个问题,那将是很好的。

    int secs = 0, usecs = 500000
    timex_delta.offset= (secs * 1000000) + msecs;
    timex_delta.status= STA_PLL;
    timex_delta.modes = ADJ_OFFSET | ADJ_STATUS;
    c = adjtimex(&timex_delta);

0 个答案:

没有答案