I need a timer which will work with milliseconds. I tried to use sleep 0.1 command in a script, but I see this error message:
sleep 0.1
syntax error: invali
Bash was complaining about decimal values,
read: 0.5: invalid timeout specification
I came around with this solution which works great.
sleep_fraction() { /usr/bin/perl -e "select(undef, undef, undef, $1)" } sleep_fraction 0.01428