1
0
Fork 0
forked from fte/fteqw

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4715 fc73d0e0-1445-4013-8a0c-d673dee63da5

This commit is contained in:
Spoike 2014-08-03 15:02:39 +00:00
parent 402aa52362
commit 5cbb8be132

View file

@ -467,16 +467,19 @@ pbool PDECL ED_ParseEval (pubprogfuncs_t *progfuncs, eval_t *eval, int type, con
//linux/unix has some annoying abstraction and shows time in nanoseconds rather than cycles. lets hope we don't waste too much time reading it. //linux/unix has some annoying abstraction and shows time in nanoseconds rather than cycles. lets hope we don't waste too much time reading it.
#include <unistd.h> #include <unistd.h>
#if defined(_POSIX_TIMERS) && _POSIX_TIMERS >= 0 #if defined(_POSIX_TIMERS) && _POSIX_TIMERS >= 0
static unsigned long long Sys_GetClock(void) #include <time.h>
{ #ifdef CLOCK_PROCESS_CPUTIME_ID
struct timespec c; static unsigned long long Sys_GetClock(void)
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &c); {
return (c.tv_sec*1000000000ull) + tc.tv_nsec; struct timespec c;
} clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &c);
static unsigned long long Sys_GetClockRate(void) return (c.tv_sec*1000000000ull) + tc.tv_nsec;
{ }
return 1000000000ull; static unsigned long long Sys_GetClockRate(void)
} {
return 1000000000ull;
}
#endif
#endif #endif
#endif #endif