mac_clock_gettime.h for time calculation