What's a good, clean way to start a timer and then get the program to do something after x amount of time has elapsed?
I guess you could do it with <time.h> and use difftime, but that's only precise to a second, which isn't exactly ideal for when I need to do things every half or quarter of a second.
I'd rather not stop the whole program though (which I think will happen with sleep). Ideally it just checks if a second or whatever has passed and then does other stuff. I think with clock() I can do that.