[Toybox] New toy: usleep
Elie De Brauwer
eliedebrauwer at gmail.com
Wed Aug 15 03:57:54 PDT 2012
Hello all,
In attachment you can find an implementation of usleep. It was on the
todo list, but on my debian I couldn't find a trace of it. Although its
behavior can be mimiced by using the floating point-version of sleep
it's actually more simple to have it functioning as a separate toy
(usleep doesn't have the suffixes, nor the floating point input which
sleep has).
When sleeping voor one second and one microsecond it translates into the
following nanosleep call:
edb at lapedb:~/edb-stuff/toybox/toybox$ strace -e nanosleep ./toybox
usleep 1000001
nanosleep({1, 1000}, NULL) = 0
gr
E.
--
Elie De Brauwer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usleep.patch
Type: text/x-patch
Size: 962 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20120815/01f66316/attachment.bin>
More information about the Toybox
mailing list