chiark
/
gitweb
/
~mdw
/
autoys
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf3c562
)
gremlin/gremlin.in: Don't report zero seconds left until we're done.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 17 Apr 2018 01:11:17 +0000
(
02:11
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 19 Apr 2018 11:22:49 +0000
(12:22 +0100)
gremlin/gremlin.in
patch
|
blob
|
blame
|
history
diff --git
a/gremlin/gremlin.in
b/gremlin/gremlin.in
index af4da27d8f166de051b12b43f21e7fdc4303d1d7..cca27893e3254163eeeee1d8746f107f789a055b 100644
(file)
--- a/
gremlin/gremlin.in
+++ b/
gremlin/gremlin.in
@@
-41,7
+41,7
@@
import shutil as SH
import optparse as OP
import threading as TH
import shlex as L
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.
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()
## 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 = '???'
else:
eta = '???'