Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/xlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index b30829d..7e59d34 100644
--- a/init.lua
+++ b/init.lua
@@ -282,8 +282,13 @@ do
indices = table.splice(indices)
times = table.splice(times)
end
- tm = 'ETA: ' .. formatTime(remaining) .. ' | Step: ' .. formatTime(step)
- io.write(tm)
+ -- Print remaining time when running or total time when done.
+ if (percent < barLength) then
+ io.write('ETA: ' .. formatTime(remaining))
+ else
+ io.write('Tot: ' .. formatTime(elapsed))
+ end
+ io.write(' | Step: ' .. formatTime(step))
-- go back to center of bar, and print progress
for i=1,6+#tm+barLength/2 do io.write('\b') end
io.write(' ', current, '/', goal, ' ')