File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 231231do
232232 local barDone = true
233233 local previous = - 1
234+ local tm = ' '
234235 local timer
235236 local times
236237 local indices
247248 if (barDone and ((previous == - 1 ) or (percent < previous ))) then
248249 barDone = false
249250 previous = - 1
251+ tm = ' '
250252 timer = torch .Timer ()
251253 times = {timer :time ().real }
252254 indices = {current }
266268 end
267269 glob .io .write (' ] ' )
268270 -- time stats
269- for i = 1 ,50 do glob .io .write (' ' ) end
270- for i = 1 ,50 do glob .io .write (' \b ' ) end
271+ for i = 1 ,# tm do glob .io .write (' ' ) end
272+ for i = 1 ,# tm do glob .io .write (' \b ' ) end
271273 local elapsed = timer :time ().real
272274 local step = (elapsed - times [1 ]) / (current - indices [1 ])
273275 if current == indices [1 ] then step = 0 end
278280 indices = table .splice (indices )
279281 times = table .splice (times )
280282 end
281- local tm = ' ETA: ' .. formatTime (remaining ) .. ' | Step: ' .. formatTime (step )
283+ tm = ' ETA: ' .. formatTime (remaining ) .. ' | Step: ' .. formatTime (step )
282284 glob .io .write (tm )
283285 -- go back to center of bar, and print progress
284286 for i = 1 ,47 +# tm do glob .io .write (' \b ' ) end
You can’t perform that action at this time.
0 commit comments