Use `clock_gettime` etc instead of `gettimeofday`

WiP.