aboutsummaryrefslogtreecommitdiff
path: root/timebomb.py
diff options
context:
space:
mode:
authorpux <pux@pux.dom>2020-02-09 19:50:50 +0100
committerpux <pux@pux.dom>2020-02-09 19:50:50 +0100
commit928fa1f2c392e0b83547047f80f30aa12aa2a826 (patch)
tree033f30b8d4f4640c83dfa767d65523d05b615765 /timebomb.py
parent04beba2aefc66a1230b9d87ea467d7938313b291 (diff)
downloadtimebomb-928fa1f2c392e0b83547047f80f30aa12aa2a826.tar.gz
timebomb-928fa1f2c392e0b83547047f80f30aa12aa2a826.tar.bz2
timebomb-928fa1f2c392e0b83547047f80f30aa12aa2a826.zip
better(?) behavior for progress bar? (you can see 100% status)
Diffstat (limited to 'timebomb.py')
-rw-r--r--timebomb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/timebomb.py b/timebomb.py
index dc721c3..9cb8496 100644
--- a/timebomb.py
+++ b/timebomb.py
@@ -68,7 +68,7 @@ def sleep(m, s):
for x in range(sleep_time_s):
pr_m, pr_s = divmod(x, 60)
print(' {:02d}:{:02d} '.format(pr_m, pr_s), end='')
- progress = int(x/sleep_time_s * pbar_len)
+ progress = int(x/(sleep_time_s-1) * pbar_len)
print('#' * progress + '_' * int(pbar_len-progress), end='')
print(' {:02d}:{:02d} '.format(m, s), end='\r')
time.sleep(1)
in each repos: see "about"-tab (if existing) for more details / README.
mailto contact at omeckman dot net
all timestamps in UTC (German winter time: UTC+01:00, summer time: UTC+02:00)
dark theme is a modded version of: https://gist.github.com/Yoplitein/f4b671a2ec70c9e743fa