Ticket #52582: patch-Fix-GetTime.c-on-Darwin-with-clock_gettime.diff
File patch-Fix-GetTime.c-on-Darwin-with-clock_gettime.diff, 716 bytes (added by shanemikel, 8 years ago) |
---|
-
rts/posix/GetTime.c
old new 33 33 // we'll implement getProcessCPUTime() and getProcessElapsedTime() 34 34 // separately, using getrusage() and gettimeofday() respectively 35 35 36 #if def darwin_HOST_OS36 #if !defined(HAVE_CLOCK_GETTIME) && defined(darwin_HOST_OS) 37 37 static uint64_t timer_scaling_factor_numer = 0; 38 38 static uint64_t timer_scaling_factor_denom = 0; 39 39 #endif 40 40 41 41 void initializeTimer() 42 42 { 43 #if def darwin_HOST_OS43 #if !defined(HAVE_CLOCK_GETTIME) && defined(darwin_HOST_OS) 44 44 mach_timebase_info_data_t info; 45 45 (void) mach_timebase_info(&info); 46 46 timer_scaling_factor_numer = (uint64_t)info.numer;