Precision isn't the thing I'm going for, just rough fractional seconds (to test copying a 1 byte file 20 times a second to profile io rates and cpu usage on an arm system, for example)
Agreeably, usleep is a moot point (and to implement nanosleep would just be a fun example of it's use). time msleep 128 real 0m0.129s user 0m0.000s sys 0m0.000s Good enough. Also, it turns out that some implementations of sleep allow fractional seconds. AJ ONeal On Wed, Jan 26, 2011 at 11:46 AM, Stuart Jansen <[email protected]> wrote: > On Wed, 2011-01-26 at 11:22 -0700, AJ ONeal wrote: >> I don't know about y'all, but I often find cases where I wish I had msleep >> in bash. >> >> https://github.com/coolaj86/msleep-commandline >> >> Now I do. Just thought I'd share. > > Micro-sleeping in bash? Somehow I suspect... > > http://lemonodor.com/archives/2007/10/youre_doing_it_wrong.html > > > /* > PLUG: http://plug.org, #utah on irc.freenode.net > Unsubscribe: http://plug.org/mailman/options/plug > Don't fear the penguin. > */ > /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
