diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2018-01-16 17:48:16 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2018-01-16 17:50:46 +0900 |
commit | 4800ce4635439edfe948ee884542fb3654c3845c (patch) | |
tree | d0fd1d47ee5abb11cc887bcc74ecf1e38f5ab315 /src/bin | |
parent | 34d9f2070696027199a56cb621c0526ea1430e8f (diff) | |
download | efl-4800ce4635439edfe948ee884542fb3654c3845c.tar.gz |
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.
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/elementary/test_genlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/elementary/test_genlist.c b/src/bin/elementary/test_genlist.c index 7db692034a..56ae76061b 100644 --- a/src/bin/elementary/test_genlist.c +++ b/src/bin/elementary/test_genlist.c @@ -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(); } |