tests: check for HAVE_CLOCK_GETTIME.
clock: include sys/time.h for clock_gettime().