If no instance is to be checked, exit soon
This commit is contained in:
parent
3feccffce0
commit
c6a0f43aaa
1 changed files with 2 additions and 1 deletions
|
@ -278,6 +278,7 @@ if ($restore) {
|
||||||
shuffle($insts);
|
shuffle($insts);
|
||||||
$cinsts=count($insts);
|
$cinsts=count($insts);
|
||||||
eecho(1,$cinsts.' instances to be checked.'.N);
|
eecho(1,$cinsts.' instances to be checked.'.N);
|
||||||
|
if ($cinsts==0) mexit('nothing to do, bye.'.N,0,true);
|
||||||
|
|
||||||
$instsf=@fopen($instsjfp,'w');
|
$instsf=@fopen($instsjfp,'w');
|
||||||
if ($instsf===false) mexit('could not open «'.$instsjfp.'» for writing.'.N,1,true);
|
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);
|
if ($done>0) $out.='; estimated time remaining: '.ght($cinsts*$tet/$done-$tet,null,0);
|
||||||
eecho(1,$out.'.'.N);
|
eecho(1,$out.'.'.N);
|
||||||
if ($somerun) {
|
if ($somerun) {
|
||||||
|
|
Loading…
Reference in a new issue