How secure are your web application’s open source dependencies?
blog.logrocket.com1 pointsby willriker0 comments
const refreshDelay = 1000 / FPS;
while (true) {
yield take(START_GAME_PLAY);
while (true) {
const {
gameState: {
speed,
isPlaying,
gameTime,
},
} = getState();
if (!isPlaying) {
// game play has stopped
break;
}
const timeDelta = refreshDelay * speed;
yield put(setGameTime(gameTime + timeDelta));
// sleep
yield call(delay, refreshDelay);
}
}
}