精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。
adjtime - correct the time to allow synchronization of thesystem clock. adjtime - 更正时间以允许的同步系统时钟
The adjtime() function adjusts the system's notion of the current time as returned by gettimeofday(3C), advancing or retarding it by the amount of time specified in the struct timeval pointed to by delta. adjtime()函数调整当前时间的系统概念通过函数gettimeofday(3C)返回,提前或通过在结构中指定的时间内量延迟。
The adjustment is effected by speeding up (if that amount of time is positive) or slowing down (if that amount of time is negative) the system's clock by some small percentage, generally a fraction of one percent. The time is always a monotonically increasing function. A time correction from an earlier call to adjtime() may not be finished when adjtime() is called again.
该调整是通过加快(如果该时间量为正),或者通过一些小百分比的通常为百分之一的减缓(如果该时间量为负)系统时钟实现的。时间始终是一个单调递增函数。当adjtime()再次从先前的adjtime()调用时,时间校正可能无法完成。
If delta is 0, then olddelta returns the status of theeffects of the previous adjtime() call with no effect on the time correction as a result of this call. If olddelta is not a null pointer, then the structure it points to will contain, upon successful return, the number of seconds and/or microseconds still to be corrected from the earlier call. If olddelta is a null pointer, the corresponding information will not be returned.
如果增量为0,那么olddelta返回和之前的adjtime() 调用效果一样,对时间校正没有影响。如果olddelta不是空指针,则它指向包含结构,成功返回,秒数或微秒仍然从早期的调用被jiaozheng。如果olddelta是空指针,相应的信息将不予退还。
This call may be used in time servers that synchronize the clocks of computers in a local area network. Such time servers would slow down the clocks of some machines and speed up the clocks of others to bring them to the average network time.
该函数可在一个局域网的同步计算机的时间服务器一起使用。这样的时间服务器将一些机器的时钟慢下来,加快他人的时钟给他们带来平均的网络时间。
Only the super-user may adjust the time of day.The adjustment value will be silently rounded to the resolution of the system clock. 只有超级用户可以调节一天中的时间。调整值将被四舍五入为系统时钟。
SEE ALSOdate(1), gettimeofday(3C
也可以看看日期(1),函数gettimeofday(3C