clock_gettime replacement for mac