<div dir="ltr"><div>Just a reminder on how clocks differ (on LInux) from one another, taken from here:<br><a href="http://www.spinics.net/lists/linux-man/msg00973.html">http://www.spinics.net/lists/linux-man/msg00973.html</a><br>
</div>Needless to say, gettimeofday() should be avoided.<br><div><div><br><pre style="margin:0em">CLOCK_REALTIME
- can jump
- can slew
</pre><tt>- if ntp is running this clock is always kept close to GMT. even if 
</tt><tt>hardware is not 100% correct, ntp will correct everything over time.<br><br>
</tt><pre style="margin:0em">CLOCK_MONOTONIC
- cannot jump
- can slew !!! (because of ntp)
</pre><tt>- it is not kept in sync with GMT. but the "speed" of seconds is kept in 
</tt><tt>sync with GMT by varying it constantly by ntp.<br><br>
</tt><pre style="margin:0em">CLOCK_MONOTONIC_RAW
- cannot jump
- cannot slew !
</pre><tt>- the speed of seconds is not the same as the speed of GMT seconds since 
</tt><tt>the hardware timer is never 100% exact and ntp daemon does NOT have 
</tt><tt>influence here
</tt><br><br><br><br>--------------------<br>/**<br><pre>*Just one question. Which clock is being used. Ideally a monotony one, or
*even better, a configurable one. We would normally not want these
*timestamps affected by the user changing the system time.</pre>**/<br></div></div></div>