User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 425,924 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,697 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 12367 | Replies: 1
Reply
Join Date: Jun 2006
Posts: 1
Reputation: vanii is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vanii vanii is offline Offline
Newbie Poster

Sleep Command in UNIX Shell Scripting

  #1  
Jun 14th, 2006
Hi all,
I want to know whether "sleep command in shell scripting is a guarenteed command or not "

In java 'Sleep() ' is not guarenteed to be called when CPU is Idle.

Regards,
VANII
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2004
Posts: 177
Reputation: jim mcnamara is on a distinguished road 
Rep Power: 5
Solved Threads: 9
jim mcnamara jim mcnamara is offline Offline
Junior Poster

Re: Sleep Command in UNIX Shell Scripting

  #2  
Jun 14th, 2006
The sleep command in unix is guaranteed to sleep a minimum.
Due to the way quanta (time slices) work in OS schedulers, other processes may get the cpu ahead of the sleeper who just awoke.

ie., there is no guarantee of an upper limit. sleep 1 may last longer than 1 second.

Linux sleep calls nanosleep - read the man page for that.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 9:01 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC