$ perl -MTime::HiRes=time -le 'while () { $a=time; print $a, " ", $a-$b; $b=$a; sleep 1.01 }' Use of uninitialized value $b in subtraction (-) at -e line 1. 1579951233.92519 1579951233.92519 1579951234.92536 1.00017690658569 1579951235.92573 1.00036287307739 1579951236.92672 1.00098919868469 1579951237.93894 1.01222395896912 1579951238.95456 1.01561999320984 1579951239.97017 1.01561403274536 1579951240.98579 1.01561689376831 1579951242.00141 1.01561808586121 !!!! 1579951243.01703 1.01561903953552 $ perl -MTime::HiRes=time -le 'print $Time::HiRes::VERSION' 1.9741 $ perl --version This is perl 5, version 26, subversion 3 (v5.26.3) built for x86_64-cygwin-threads-multi (with 7 registered patches, see perl -V for more detail) Copyright 1987-2018, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.