Add useless delays

This commit is contained in:
Midgard 2021-01-26 12:53:36 +01:00
parent bbe94a1124
commit 4582af4c43
Signed by: midgard
GPG key ID: 511C112F1331BBB4

15
hist.py
View file

@ -2,6 +2,7 @@
import sys import sys
import re import re
import time
unknown = 0 unknown = 0
skipped = 0 skipped = 0
@ -20,6 +21,7 @@ for line in sys.stdin:
BLOCKS = "▁▂▃▄▅▆▇█" BLOCKS = "▁▂▃▄▅▆▇█"
HEIGHT = 20 HEIGHT = 20
SPEED = 400
max_val = max([*hours, unknown, skipped]) max_val = max([*hours, unknown, skipped])
@ -39,6 +41,9 @@ def print_block(value, row):
else: else:
print(BLOCKS[int(height_value * len(BLOCKS))], end=" ") print(BLOCKS[int(height_value * len(BLOCKS))], end=" ")
sys.stdout.flush()
time.sleep(2 / SPEED)
cutoff = 12 cutoff = 12
hour_indices = [*range(cutoff, 24), *range(0, cutoff)] hour_indices = [*range(cutoff, 24), *range(0, cutoff)]
@ -54,6 +59,10 @@ for row in range(HEIGHT):
print_block(unknown_norm, row) print_block(unknown_norm, row)
print() print()
for h in hour_indices[::2]: for c in (
print(f"{h: >2}", end=" ") "".join(f"{h: >2} " for h in hour_indices[::2]) +
print(" skp unk") " skp unk"
):
print(c, flush=True, end="")
time.sleep(1 / SPEED)
print()