4 ms·
The timestamps use linux' local_clock (which is per-cpu). It will also drift, even if you never suspend/resume. The longer the uptime, the higher this discrepa
by aepiepaey 8y ago
The timestamps use linux' local_clock (which is per-cpu). It will also drift, even if you never suspend/resume.
The longer the uptime, the higher this discrepancy can be.
This means the timestamp is useless for many purposes.
You can check the current offset using:
echo test >> /dev/kmsg && uptime=$(cut -d' ' -f 1 /proc/uptime ) && timestamp=$(dmesg |tail -1| awk -F '[][]' {'print $2'}) && echo "$timestamp-$uptime" | bc