JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Use monotonic clock to prevent timing issues
authorFRIGN <dev@frign.de>
Mon, 23 Jun 2014 14:51:51 +0000 (16:51 +0200)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Tue, 24 Jun 2014 19:45:36 +0000 (21:45 +0200)
This patch replaces the gettimeofday()/timeval-system with
uses of clock_gettime() with a monolithic clock and timespec-structs.
gettimeofday() is not accurate and prone to jumps and POSIX.1-2008
marks it as obsolete. Read more here [0].

The patch should speak for itself and decreases the binary
size for me by almost 200K(!).

[0]: http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>


No differences found