我在主机中使用 hwclock 命令然后我得到以下内容
hwclock
Fri 22 Nov 2019 10:42:56 AM CST -0.062877 seconds
但我不知道-0.062877秒是什么意思
0.062877 秒是在 shell 上给出的时间命令和读取硬件时钟的时间之间的差异。
$ time sudo hwclock
Thu Nov 21 21:08:24 2019 -0.710984 seconds
real 0m0.719s
user 0m0.004s
sys 0m0.005s
$ time sudo hwclock
Thu Nov 21 21:08:32 2019 -0.775224 seconds
real 0m0.783s
user 0m0.002s
sys 0m0.006s
$ time sudo hwclock
Thu Nov 21 21:08:39 2019 -0.467983 seconds
real 0m0.475s
user 0m0.003s
sys 0m0.006s
[sharad@sharad-singla ~]$
$ time sudo hwclock -D
hwclock from util-linux-ng 2.17.2
Using /dev interface to clock.
Last drift adjustment done at 1574399257 seconds after 1969
Last calibration done at 1474351262 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2019/11/22 05:12:25
Hw clock time : 2019/11/22 05:12:25 = 1574399545 seconds since 1969
Thu Nov 21 21:12:25 2019 -0.721502 seconds
real 0m0.729s
user 0m0.005s
sys 0m0.004s
$
参考: