Since CLOCK_PROCESS_CPUTIME_ID is a POSIX standard, we use it if it

exists regardles of system. Seems BSD actually is the weird case here.
Still use CLOCK_REALTIME as fallback.

SVN revision: 37249
This commit is contained in:
Sebastian Dransfeld 2008-10-27 15:16:06 +00:00
parent 23fdacaa1e
commit 0b115add8e
1 changed files with 3 additions and 3 deletions

View File

@ -76,12 +76,12 @@ static int _eina_counter_init_count = 0;
static inline int
_eina_counter_time_get(Eina_Nano_Time *tp)
{
#if defined (__linux__) && defined(CLOCK_PROCESS_CPUTIME_ID)
#if defined(CLOCK_PROCESS_CPUTIME_ID)
return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp);
#elif defined(__FreeBSD__) && defined(CLOCK_PROF)
#elif defined(CLOCK_PROF)
return clock_gettime(CLOCK_PROF, tp);
#else
return clock_gettime(CLOCK, tp);
return clock_gettime(CLOCK_REALTIME, tp);
#endif
}
#else