corrected prediction of computation time

This commit is contained in:
Christoph Kords 2013-05-09 11:33:40 +00:00
parent ed1674ee1c
commit 193c77f526
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ if not os.path.isdir(dirname):
time_start = time.time() time_start = time.time()
for incCount,position in enumerate(locations): # walk through locations for incCount,position in enumerate(locations): # walk through locations
p.moveto(position+1) # wind to correct position p.moveto(position+1) # wind to correct position
time_delta = (float(stat['NumberOfIncrements']) / float(incCount+1) - 1.0) * (time.time() - time_start) time_delta = (float(len(locations)) / float(incCount+1) - 1.0) * (time.time() - time_start)
sys.stdout.write("\r(%02i:%02i:%02i) processing increment %i of %i..."%(time_delta//3600,time_delta%3600//60,time_delta%60,incCount+1,len(locations))) sys.stdout.write("\r(%02i:%02i:%02i) processing increment %i of %i..."%(time_delta//3600,time_delta%3600//60,time_delta%60,incCount+1,len(locations)))
sys.stdout.flush() sys.stdout.flush()