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:
Carsten Haitzler 2018-01-16 17:48:16 +09:00
parent 34d9f20706
commit 4800ce4635
1 changed files with 3 additions and 3 deletions

View File

@ -365,11 +365,11 @@ _bounce_cb(void *data)
unsigned long long tll, t0ll, tdll;
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t);
t0ll = (t0.tv_sec * 1000000000) + t0.tv_nsec;
tll = (t.tv_sec * 1000000000) + t.tv_nsec;
t0ll = (((unsigned long long)t0.tv_sec) * 1000000000ULL) + t0.tv_nsec;
tll = (((unsigned long long)t.tv_sec) * 1000000000ULL) + t.tv_nsec;
tdll = tll - t0ll;
printf("NS since 2 = %llu , %llu frames = %llu / frame\n",
tdll, frames, tdll / (unsigned long long)frames);
tdll, frames, tdll / frames);
#endif
if (getenv("ELM_TEST_AUTOBOUNCE")) elm_exit();
}