time.h and clock_gettime need -lrt.