• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to write a C program that executes a statement every N milliseconds?

GMaximus

Senior member
The topic says it all. I would like to write a C program that runs on Linux that executes a statement every N milliseconds, and was wondering if anyone could assist me.
 
C by Dissection:

void sleep(unsigned seconds);

Supends the curent process from execution for the number of seconds requested. Time is approximate.
 
Originally posted by: GMaximus
Awesome man, this seems to be exactly what I'm looking for. Thanks a bunch!

No problem...make sure my micro-->millisecond calculations were right. I'm not the best at math...
 
Back
Top