How to give delay() in a c program in linux operating system.
Please advice me how to include a delay in my parallelised c program in linux os.
|
I assume that 'parallelised' means, you are writing a multi-threaded application. If you want one of your threads to wait for a while, you can use sleep() or nanosleep(). Depending on the multi threading environment you use, there might be more specific functions.
Ask yourself if you really need a delay or if you better should use a mutex or a semaphore instead. |
All times are GMT -5. The time now is 05:14 PM. |