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, 9 months ago)
  • rts/posix/GetTime.c

    old new  
    3333// we'll implement getProcessCPUTime() and getProcessElapsedTime()
    3434// separately, using getrusage() and gettimeofday() respectively
    3535
    36 #ifdef darwin_HOST_OS
     36#if !defined(HAVE_CLOCK_GETTIME) && defined(darwin_HOST_OS)
    3737static uint64_t timer_scaling_factor_numer = 0;
    3838static uint64_t timer_scaling_factor_denom = 0;
    3939#endif
    4040
    4141void initializeTimer()
    4242{
    43 #ifdef darwin_HOST_OS
     43#if !defined(HAVE_CLOCK_GETTIME) && defined(darwin_HOST_OS)
    4444    mach_timebase_info_data_t info;
    4545    (void) mach_timebase_info(&info);
    4646    timer_scaling_factor_numer = (uint64_t)info.numer;