我正在像这样测量 deltaTime:
deltaTime = (System.nanoTime()-startTime) / 1000000000.0f;
startTime = System.nanoTime();
但是我总是得到不同的浮点值,因此我的游戏口吃。这可能是什么问题?
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