MTR: loops should divide milliseconds by milliseconds

timeout is in seconds, sleeptime is in miliseconds. Otherwise we sleep
for 10 times longer than the timeout.
This commit is contained in:
Vicențiu Ciorbaru 2021-09-28 18:14:11 +03:00
parent e79fa9f542
commit 27738bd774

View file

@ -109,7 +109,7 @@ sub sleep_until_file_created ($$$$$) {
my $proc= shift;
my $warn_seconds = shift;
my $sleeptime= 10; # Milliseconds
my $loops= ($timeout * 10000) / $sleeptime;
my $loops= ($timeout * 1000) / $sleeptime;
my $message_time= 60;
for ( my $loop= 0; $loop <= $loops; $loop++ )