+1
−1
+1
−1
+1
−1
+1
−1
Loading
gettimeofday(2) is vulnerable to issues around time changes (DST, leap seconds, other clock resets) that could cause strange behavior. clock_gettime with CLOCK_MONOTONIC will give more accurate time deltas, and should be used instead. (clock_gettime is not available on OSX, and possibly other OSs, so it should be wrapped.)