http://www.perlmonks.org?node_id=987966


in reply to How to sleep 1 microsecond?

You cannot use gettimeofday to measure how long you sleep since a call to that function by itself takes too long for your needs.
my @first = gettimeofday; my @second = gettimeofday; say "[@first] [@second] ", $second[1]-$first[1];
Output:
[1345208919 179070] [1345208919 179072] 2