r/learnprogramming • • 20m ago

How could i decrement a value in a variable, x times over a certain period of time in C?

I'm creating an emulator of CHIP-8 in C following the Tobias' guide and I should decrement the value of delay and sound timers 60 times per seconds but i don't know how to do this. Maybe could be something in SDL2 but i want to implement this feature independently by this library so i can easily import this emulator on other devices changing just the graphics and input management.

0 Upvotes

1 comment sorted by

•

u/jeffcgroves 15m ago

Asynchronous programming maybe something to google.