LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-25-2004, 08:29 AM   #1
Mike Davies
Member
 
Registered: Jul 2004
Distribution: Custom Linux 3.1/Busybox. Fedora 19, Raspberry Pi
Posts: 94

Rep: Reputation: 15
looking for a Sleep() function


I'm looking for a function that will suspend the current thread for several mSec. In Windows this would be Sleep().

What does Linux offer ? I've found udelay() and mdelay() but it involves dragging in include files that then cause other problems.

ANy help appreciated.

Mike
 
Old 10-25-2004, 08:36 AM   #2
khtse
Member
 
Registered: Sep 2003
Location: Hong Kong
Distribution: Slackware 9.1
Posts: 43

Rep: Reputation: 15
man usleep:

NAME
usleep - suspend execution for microsecond intervals

SYNOPSIS
/* BSD version */
#include <unistd.h>

void usleep(unsigned long usec);

DESCRIPTION
The usleep() function suspends execution of the calling
process for (at least) usec microseconds. The sleep may
be lengthened slightly by any system activity or by the
time spent processing the call or by the granularity of
system timers.
 
Old 10-25-2004, 09:11 AM   #3
Mike Davies
Member
 
Registered: Jul 2004
Distribution: Custom Linux 3.1/Busybox. Fedora 19, Raspberry Pi
Posts: 94

Original Poster
Rep: Reputation: 15
Excellent !

Many thanks.
 
  


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
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 02:14 AM
How to disable the Monitor Sleep function under RH9 ?? 242VDM242 Linux - Newbie 1 05-21-2005 02:51 PM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 02:31 PM
Is the wait function is the same as the sleep function ? Linh Programming 3 04-28-2004 01:39 PM
help using rtc as a more accurate replacement for python's 'sleep' function kernelpanicguy Programming 0 11-29-2003 01:36 AM


All times are GMT -5. The time now is 04:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration