Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-24-2012, 01:05 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
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.
Old 01-24-2012, 04:56 AM   #2
LQ Newbie
Registered: Jan 2012
Location: Germany
Distribution: Debian
Posts: 11

Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tracing Intruders connecting to our system in Redhat Linux operating system vkunasani Linux - Software 4 02-15-2010 07:23 AM
'Operating system not found' Any operating system installed wont work. TechniSlave Linux - Newbie 55 02-09-2009 12:02 PM
what is the best linux operating system? wutever Linux - Newbie 8 08-18-2004 03:39 PM
Why Linux is best Operating System for Learning/Doing System Programming ? ubaid_t General 6 03-21-2004 03:10 PM
Is linux and Operating system benjaminrtz Linux - General 21 05-03-2003 02:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration