refactor to marco and disable clock_gettime on OSX