简体   繁体   中英

linux bash command hwclock output meaning

i use the hwclock command in host then i get the Below content

hwclock
Fri 22 Nov 2019 10:42:56 AM CST  -0.062877 seconds

but i dont know what's the meaning of -0.062877 seconds

0.062877 seconds is the difference between the time command was given on the shell and the time the hardware clock was read.

$ 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
$

References:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM