in reply to Re^4: negative elapsed time? (versions?)
in thread negative elapsed time?
Please cut&paste the output from this modified version of your script
#!/usr/bin/perl -w use strict; use Win32; use Time::HiRes; print $], "\n", $Time::HiRes::VERSION, "\n", Win32::GetOSName(); print "\nStarting loop\n"; for ( 1..1e6 ) { my $t3 = Time::HiRes::time(); my $t4 = Time::HiRes::time(); my $t5 = $t4 - $t3; if( $t5 <= 0 ) { print "\n Value negative in count: $_"; print "\n t3: "; printf "%.6f",$t3; print "\n t4: "; printf "%.6f\n",$t4; print "\n Negative or zero value: $t5"; } } print "\nEnd of loop\n";
|
|---|