Re:gettimeofday() should never be used to measure time
by tedunangst on Sunday January 18, 2015 @11:52PM
(#8910401)
The simple solution would seem to be setting the clock first then doing the packet capture instead of setting the clock in the middle of the packet capture.
Re:gettimeofday() should never be used to measure time
by toast0 on Sunday January 18, 2015 @11:24PM
(#8910309)
for debian based embedded systems, the fake-hwclock package is helpful here (it's a script to periodically save the current time, and restore on boot). You'll still have big jumps after a power loss, but probably not years. It's also helpful in case you ever change the motherboard on a regular system with a RTC.
One example is embedded systems. Many don't have an RTC, or boot after the RTC has lost power. If a network connection finally comes up, NTP will instantly fast-forward the clock by years