Android OpenGL deltaTime Measure issue
Posted
by
droidmachine
on Stack Overflow
See other posts from Stack Overflow
or by droidmachine
Published on 2012-09-03T00:55:14Z
Indexed on
2012/09/03
3:38 UTC
Read the original article
Hit count: 180
I'm measuring deltaTime like that:
deltaTime = (System.nanoTime()-startTime) / 1000000000.0f;
startTime = System.nanoTime();
But I'm always getting different float values and because of that my game is stuttering.What can be the problem of that?
09-03 03:51:59.219: D/a(21807): 0.017184043
09-03 03:51:59.234: D/a(21807): 0.016405167
09-03 03:51:59.249: D/a(21807): 0.018071748
09-03 03:51:59.269: D/a(21807): 0.015293334
09-03 03:51:59.284: D/a(21807): 0.016080335
09-03 03:51:59.299: D/a(21807): 0.018669458
09-03 03:51:59.314: D/a(21807): 0.014720625
09-03 03:51:59.334: D/a(21807): 0.01605596
09-03 03:51:59.349: D/a(21807): 0.017086169
© Stack Overflow or respective owner