当前位置: 技术问答>linux和unix
linux sudo hwclock 输出打印问题
来源: 互联网 发布时间:2016-12-26
本文导语: RT。 besovideo@besovideo-desktop:/tftpboot$ sudo hwclock 2011年08月29日 星期一 15时51分36秒 -0.500163 seconds 这个 -0.500163 seconds 是什么意思。希望大家能帮忙,谢谢大家。 | http://topic.csdn.net/u/20110829/15/4ad9a308-533...
RT。
besovideo@besovideo-desktop:/tftpboot$ sudo hwclock
2011年08月29日 星期一 15时51分36秒 -0.500163 seconds
这个 -0.500163 seconds 是什么意思。希望大家能帮忙,谢谢大家。
besovideo@besovideo-desktop:/tftpboot$ sudo hwclock
2011年08月29日 星期一 15时51分36秒 -0.500163 seconds
这个 -0.500163 seconds 是什么意思。希望大家能帮忙,谢谢大家。
|
|
误差
/*----------------------------------------------------------------------------
Display on Standard Output the value of the Hardware Clock, which is described by these arguments:
...
referenceTime: The system time at which this program started (so,the moment at which the user wanted to know the time)
readTime: The system time at which we read the clock.
...
*/
...
float const displayDelay = time_diff(readTime, referenceTime);
...
printf("%s %s %.6f seconds %sn",
ctime2(hclockTime),
synchronized ? "" : "+", -(displayDelay),
brokenTime.tm_isdst ? tzname[1] : tzname[0]);
读取时钟时的系统时间-用户提出请求读取时间的系统时间
也就是说用户发出请求和实际开始获取时间中间有间隔,可以理解为误差或者延时
/*----------------------------------------------------------------------------
Display on Standard Output the value of the Hardware Clock, which is described by these arguments:
...
referenceTime: The system time at which this program started (so,the moment at which the user wanted to know the time)
readTime: The system time at which we read the clock.
...
*/
...
float const displayDelay = time_diff(readTime, referenceTime);
...
printf("%s %s %.6f seconds %sn",
ctime2(hclockTime),
synchronized ? "" : "+", -(displayDelay),
brokenTime.tm_isdst ? tzname[1] : tzname[0]);
读取时钟时的系统时间-用户提出请求读取时间的系统时间
也就是说用户发出请求和实际开始获取时间中间有间隔,可以理解为误差或者延时
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。