diff --git a/kernels/typing-game/game.c b/kernels/typing-game/game.c index fa0c61b..f2273a9 100644 --- a/kernels/typing-game/game.c +++ b/kernels/typing-game/game.c @@ -151,8 +151,9 @@ int main() { printf("Type 'ESC' to exit\n"); int current = 0, rendered = 0; + uint64_t t0 = io_read(AM_TIMER_UPTIME).us; while (1) { - int frames = io_read(AM_TIMER_UPTIME).us / (1000000 / FPS); + int frames = (io_read(AM_TIMER_UPTIME).us - t0) / (1000000 / FPS); for (; current < frames; current++) { game_logic_update(current);