Lab 2 Check
sh
machinelab test timer
machinelab run --headless -- build/examples/timer_int 3Discussion Prompts
- Why does the timer API expose
timer_ticks()instead of sleeping directly? - What changes if your game updates at 60 Hz but the timer fires faster?
- Which timing values should be constants?
External Reading
- OSDev Programmable Interval Timer: https://wiki.osdev.org/Programmable_Interval_Timer
- OSDev Interrupts overview: https://wiki.osdev.org/Interrupts
- GNU C integer types: https://www.gnu.org/software/libc/manual/html_node/Integers.html