diff options
Diffstat (limited to 'examples/mixed')
-rw-r--r-- | examples/mixed | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/examples/mixed b/examples/mixed index 5770dc8..3211ad5 100644 --- a/examples/mixed +++ b/examples/mixed @@ -15,15 +15,6 @@ OUTPUT, HEIGHT, YPOS, TOP = 0, 12, 0, True text = '' clock_ = Clock(format = '%Y-(%m)%b-%d %T, %a w%V, %Z', sync_to = 0.5) -class Clocked: - def __init__(self, *args): - self.sometimes = Sometimes(*args) - self.text = self.sometimes() - def __call__(self, update = False): - if update: - self.text = self.sometimes() - return self.text - functions = [ lambda : text , Clocked(clock_.read, 1) ] @@ -43,9 +34,7 @@ def start(): bar.invalidate() def update_per_clock(): - for f in functions: - if isinstance(f, Clocked): - f(True) + Clocked.update_all(functions) bar.invalidate() async(lambda : forever(read_stdin)) |