forked from enlightenment/efl
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:
parent
23fdacaa1e
commit
0b115add8e
|
@ -76,12 +76,12 @@ static int _eina_counter_init_count = 0;
|
||||||
static inline int
|
static inline int
|
||||||
_eina_counter_time_get(Eina_Nano_Time *tp)
|
_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);
|
return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp);
|
||||||
#elif defined(__FreeBSD__) && defined(CLOCK_PROF)
|
#elif defined(CLOCK_PROF)
|
||||||
return clock_gettime(CLOCK_PROF, tp);
|
return clock_gettime(CLOCK_PROF, tp);
|
||||||
#else
|
#else
|
||||||
return clock_gettime(CLOCK, tp);
|
return clock_gettime(CLOCK_REALTIME, tp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue