LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-24-2012, 12:05 AM   #1
rummana
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, 03:56 AM   #2
jebe88
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.
 
  


Reply


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 06:23 AM
'Operating system not found' Any operating system installed wont work. TechniSlave Linux - Newbie 55 02-09-2009 11:02 AM
what is the best linux operating system? wutever Linux - Newbie 8 08-18-2004 02:39 PM
Why Linux is best Operating System for Learning/Doing System Programming ? ubaid_t General 6 03-21-2004 02:10 PM
Is linux and Operating system benjaminrtz Linux - General 21 05-03-2003 01:46 AM


All times are GMT -5. The time now is 10:52 AM.

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