chiark / gitweb /
gremlin/gremlin.in: Don't report zero seconds left until we're done.
[autoys] / gremlin / gremlin.in
index af4da27d8f166de051b12b43f21e7fdc4303d1d7..cca27893e3254163eeeee1d8746f107f789a055b 100644 (file)
@@ -41,7 +41,7 @@ import shutil as SH
 import optparse as OP
 import threading as TH
 import shlex as L
-from math import sqrt
+from math import sqrt, ceil
 from contextlib import contextmanager
 
 ## eyeD3 tag fettling.
@@ -247,7 +247,7 @@ class ProgressEyecandy (object):
     ## Work out -- well, guess -- the time remaining.
     if cur:
       t = T.time()
-      eta = me._fmt_time((t - me._start)*(max - cur)/cur)
+      eta = me._fmt_time(ceil((t - me._start)*(max - cur)/cur))
     else:
       eta = '???'