Discussion:
Millisecond sleep C functions in FreeBSD ???
(too old to reply)
H.P.L.
2003-08-18 20:17:35 UTC
Permalink
I need this info for the port of a (free) Linux program
in C language to FreeBSD. For Linux, I'm using nanosleep()
but can also use usleep().
http://www.freebsd.org/cgi/man.cgi?query=nanosleep&sektion=2&apropos=0&manpath=FreeBSD+4.8-RELEASE

Sergio.
--
BSD is for UNIX lovers -- linux is for Windows haters.
Dariusz Kuliński / TaKeDa
2003-08-18 20:22:56 UTC
Permalink
Hi folks,
Can anyone tell this non-FreeBSD user what C functions are
available for millisecond-level sleep ?
I need this info for the port of a (free) Linux program
in C language to FreeBSD. For Linux, I'm using nanosleep()
but can also use usleep().
I belive that you'll need to use usleep (as you know it's in microseconds),
I don't think there is a command with milliseconds level.
--
***@IRCnet.EFnet
ICQ# 15827691, GG# 113344, EMAIL: ***@NsOnSePaAkMemail.com
(remove CAPITAL letters from email if you want to contact me)
SCSA, SCNA, LPIC, CCNA, MCP
Stephen Paskaluk
2003-08-18 20:20:59 UTC
Permalink
Hi folks,
Can anyone tell this non-FreeBSD user what C functions are
available for millisecond-level sleep ?
I need this info for the port of a (free) Linux program
in C language to FreeBSD. For Linux, I'm using nanosleep()
but can also use usleep().
You should be able to use those in FreeBSD as well. Check out the man
pages (which you can read online at freebsd.org) nanosleep(2) and
usleep(3).
--
Stephen Paskaluk

... Any resemblance between the above views and those of my employer,
my terminal, or the view out my window are purely coincidental. Any
resemblance between the above and my own views is non-deterministic. The
question of the existence of views in the absence of anyone to hold them
is left as an exercise for the reader. The question of the existence of
the reader is left as an exercise for the second god coefficient. (A
discussion of non-orthogonal, non-integral polytheism is beyond the scope
of this article.)
Charles Sullivan
2003-08-19 13:58:22 UTC
Permalink
Post by Stephen Paskaluk
Hi folks,
Can anyone tell this non-FreeBSD user what C functions are available for
millisecond-level sleep ?
I need this info for the port of a (free) Linux program in C language to
FreeBSD. For Linux, I'm using nanosleep() but can also use usleep().
You should be able to use those in FreeBSD as well. Check out the man
pages (which you can read online at freebsd.org) nanosleep(2) and
usleep(3).
Very nice, that man page library on freebsd.org. If I had known
about it earlier I would have saved myself some grief. Thanks
for your response.

Regards,
Charles Sullivan
Charles Sullivan
2003-08-22 05:00:26 UTC
Permalink
nanosleep is available on HP-UX, Solaris, tru64, on AIX it's called
nsleep so
if ever need to port those OS's it's available.
I've had no call for any of these yet, but it's good to know.
Thanks for the info.

Regards,
Charles Sullivan

Loading...