If no instance is to be checked, exit soon

This commit is contained in:
pezcurrel 2024-02-26 19:21:01 +01:00
parent 3feccffce0
commit c6a0f43aaa

View file

@ -278,6 +278,7 @@ if ($restore) {
shuffle($insts);
$cinsts=count($insts);
eecho(1,$cinsts.' instances to be checked.'.N);
if ($cinsts==0) mexit('nothing to do, bye.'.N,0,true);
$instsf=@fopen($instsjfp,'w');
if ($instsf===false) mexit('could not open «'.$instsjfp.'» for writing.'.N,1,true);
@ -330,7 +331,7 @@ do {
}
}
}
$out=$done.'/'.$cinsts.' ('.round(100/$cinsts*$done).'%); elapsed time: '.ght($tet,null,0);
$out=$done.'/'.$cinsts.' ('.round(100*$done/$cinsts).'%); elapsed time: '.ght($tet,null,0);
if ($done>0) $out.='; estimated time remaining: '.ght($cinsts*$tet/$done-$tet,null,0);
eecho(1,$out.'.'.N);
if ($somerun) {