Implemented fix for timing issues as  proposed by Alexander H.

`Commit 6e8bdc tried to change currentTime() to seconds but there was a failure
in calculation seconds (tv_sec should not be devided by us_per_sec).

Fix this. And while beeing there, change the use of depricated gettimeofday()
to clock_gettime() with using a monotonic clock.`

Thanks for the fix, Alexander