correct the pitch

By just reusing the same timespec, we can diminish the calls to
clock_gettime() while simultaneously making the timing more accurate (we
don't have a span of error between the end of clock_nanosleep() and the
next clock_gettime()).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
add error handling for clock_*

Signed-off-by: Brian Norris <computersforpeace@gmail.com>