forked from enlightenment/efl
elm genlist test - don't overflow test time nanoseconds if system slow
with a long enough test or slow enough machine these do overflow so force everything to unsigned long long's for genlist test performance measuring.
This commit is contained in:
parent
34d9f20706
commit
4800ce4635
|
@ -365,11 +365,11 @@ _bounce_cb(void *data)
|
||||||
unsigned long long tll, t0ll, tdll;
|
unsigned long long tll, t0ll, tdll;
|
||||||
|
|
||||||
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t);
|
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t);
|
||||||
t0ll = (t0.tv_sec * 1000000000) + t0.tv_nsec;
|
t0ll = (((unsigned long long)t0.tv_sec) * 1000000000ULL) + t0.tv_nsec;
|
||||||
tll = (t.tv_sec * 1000000000) + t.tv_nsec;
|
tll = (((unsigned long long)t.tv_sec) * 1000000000ULL) + t.tv_nsec;
|
||||||
tdll = tll - t0ll;
|
tdll = tll - t0ll;
|
||||||
printf("NS since 2 = %llu , %llu frames = %llu / frame\n",
|
printf("NS since 2 = %llu , %llu frames = %llu / frame\n",
|
||||||
tdll, frames, tdll / (unsigned long long)frames);
|
tdll, frames, tdll / frames);
|
||||||
#endif
|
#endif
|
||||||
if (getenv("ELM_TEST_AUTOBOUNCE")) elm_exit();
|
if (getenv("ELM_TEST_AUTOBOUNCE")) elm_exit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue