X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/38f8e261e2576fbe3b97fa747abc9257f2b2443b..e1ef5a6b6a94ddc9d70d61451ad064e367132def:/src/xbt/xbt_os_time.c diff --git a/src/xbt/xbt_os_time.c b/src/xbt/xbt_os_time.c index cd316484cb..de45dd716d 100644 --- a/src/xbt/xbt_os_time.c +++ b/src/xbt/xbt_os_time.c @@ -357,7 +357,7 @@ void xbt_os_threadtimer_start(xbt_os_timer_t timer) timer->elapse.tv_sec = 0; timer->elapse.tv_nsec = 0; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start)); -#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__)//attempt for timing of the thread on OSX +#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) && defined(__APPLE__)//attempt for timing of the thread on OSX timer->elapse.tv_sec = 0; timer->elapse.tv_usec = 0; int count = THREAD_BASIC_INFO_COUNT; @@ -397,7 +397,7 @@ void xbt_os_threadtimer_resume(xbt_os_timer_t timer) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_nsec += timer->stop.tv_nsec - timer->start.tv_nsec; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start)); -#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) +#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) && defined(__APPLE__) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; int count = THREAD_BASIC_INFO_COUNT; @@ -436,7 +436,7 @@ void xbt_os_threadtimer_stop(xbt_os_timer_t timer) { #ifdef HAVE_POSIX_GETTIME clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->stop)); -#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) +#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) && defined(__APPLE__) int count = THREAD_BASIC_INFO_COUNT; thread_basic_info_data_t thi_data; thread_basic_info_t thi = &thi_data;