add -lrt to build flags for clock_gettime