Function timeval_to_secs() takes as the last argument the unit-scale in which
you want the fractional part returned to be in. When you call this function to
get your fractional part in centiseconds or in milliseconds, all is good. But
if you ask it to be in nanoseconds, then the number returned is just wrong.
Attached is the patch that fixes that.
Patch (apply with `patch -p0'):