[modules/cpu] Add initial version of CPU utilization module
Re-enable the CPU utilization module as proof-of-concept for the new core engine. see #23
This commit is contained in:
parent
8855f1155b
commit
aacc56a4e2
9 changed files with 85 additions and 10 deletions
|
@ -55,10 +55,12 @@ class Engine(object):
|
|||
while self.running():
|
||||
widgets = []
|
||||
for module in self._modules:
|
||||
widgets += module.widgets()
|
||||
self._output.draw(widgets)
|
||||
module_widgets = module.widgets()
|
||||
widgets += module_widgets if isinstance(module_widgets, list) else [module_widgets]
|
||||
self._output.draw(widgets=widgets, engine=self)
|
||||
self._output.flush()
|
||||
time.sleep(1)
|
||||
if self.running():
|
||||
time.sleep(1)
|
||||
|
||||
self._output.stop()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue