Simplify time tracking loop
This commit is contained in:
parent
ed81ba995f
commit
67884c38c6
|
@ -115,15 +115,12 @@ fn main() {
|
|||
|
||||
let mut itime = 0;
|
||||
while itime < ntime {
|
||||
sys.advance(steps_between_outputs);
|
||||
let nexttime = (itime + steps_between_outputs).max(ntime);
|
||||
sys.advance(nexttime - itime);
|
||||
|
||||
itime += steps_between_outputs;
|
||||
itime = nexttime;
|
||||
sys.output(itime);
|
||||
}
|
||||
if itime != ntime {
|
||||
sys.advance(ntime - itime);
|
||||
sys.output(ntime);
|
||||
}
|
||||
|
||||
if !opt.no_progressbar {
|
||||
sys.finish_progressbar();
|
||||
|
|
Loading…
Reference in New Issue