Is there usleep for Ubuntu?

2

There's usleep() in libc, but I didn't find any command line utility to do this.

Though I've written a piece of C code, I'm still wonder if it already existed somewhere?

Xiè Jìléi

Posted 2010-07-21T10:41:36.437

Reputation: 14 766

Answers

1

SleepEnh maybe?

badp

Posted 2010-07-21T10:41:36.437

Reputation: 3 457

1Well, sleepenh uses float numbers, I'm just curious whether it's useable in embedded system. Thanks. – Xiè Jìléi – 2010-07-21T13:03:47.180

The link doesn't work. This is the issue with link only answers – Dave – 2018-10-30T18:17:59.833

1

There is a version of usleep as part of the nosql RDBM package. The installation of nosql requires procmail and postfix, so it is a bit heavy handed to install all that for one tiny utility.

However, if you locate and download the .deb package without installing it, you can use tar to unwind it (a deb package is simply a compressed tar file containing compressed tar files). Extract only /usr/lib/nosql/usleep, and put it somewhere in your path where you have permissions to install it (/usr/bin, /usr/local/bin, ~/bin). It "just worked" on my Lucid system, so apparently the required libraries (glibc I'd bet) are there; no additional packages required.

C P Oakes

Posted 2010-07-21T10:41:36.437

Reputation: 11

0

Install the busybox package, it includes usleep.

ArthurChamz

Posted 2010-07-21T10:41:36.437

Reputation: 543