Hello everybody,
reading run(), I noticed gettimeofday() is being used to measure
time-differences.
This is not good practice[0], given gettimeofday is inaccurate for this
matter (take time-jumps for instance). POSIX.1-2008 even marks it as
obsolete!
This patch will move the entire timing-system over to clock_gettime
()-calls with a monotonic clock to enable a consistent timing
interface.
This didn't require dramatic changes to the code and reduced the binary
size for me by almost 200K!
Cheers
FRIGN
[0]:
http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time
--
FRIGN <dev_AT_frign.de>
Received on Mon Jun 23 2014 - 17:05:49 CEST