Forum Discussion
Altera_Forum
Honored Contributor
21 years agosimple friendly wait timer?
Hello, I just want a simple OS friendly wait timer. I want to wait for 20ms and then continue my loop. However, I dont want just write some proccesor intensive loop (which obviously doesnt work in...
Altera_Forum
Honored Contributor
21 years agoIf you're in a linux environment, the function that you want is usleep(unsigned long usec). Please note, though, that it only sleeps for a minimum of the specified number of milliseconds -- it might sleep longer. Life is much harder if you're trying to go for guaranteed time intervals.