Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
0,04 с (25 кадров (циклов) в секунду)1000 / 4 = 250
Canvas canvas;</code>
int framesSkipped;</font>// number of frames being skipped
timeDiff = System.currentTimeMillis() - beginTime;</font> // calculate how long did the cycle take
if (sleepTime > 0) {</font> // if sleepTime > 0 we're OK
try {</font>
this.gameView.update();</font> // update without rendering
Игровой цикл