[core/output] Implement simple wait
To pace the output lines, implement a simple wait() call for the i3 output.
This commit is contained in:
parent
fed80fb470
commit
a17cd4759c
2 changed files with 5 additions and 1 deletions
|
@ -17,7 +17,7 @@ def main():
|
|||
module.update()
|
||||
sys.stdout.write(output.draw(module))
|
||||
sys.stdout.write(output.end_status_line())
|
||||
output.sleep(config.interval())
|
||||
output.wait(config.interval())
|
||||
sys.stdout.write(output.stop())
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
import time
|
||||
|
||||
class i3(object):
|
||||
def start(self):
|
||||
|
@ -13,4 +14,7 @@ class i3(object):
|
|||
def end_status_line(self):
|
||||
return '],\n'
|
||||
|
||||
def wait(self, interval):
|
||||
time.sleep(interval)
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Reference in a new issue