mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Merge pull request #1306 from molobrakos/sleep
Don't use 100% CPU in quiet mode
This commit is contained in:
commit
67c3eee9a7
@ -20,6 +20,7 @@
|
|||||||
"""Manage the Glances standalone session."""
|
"""Manage the Glances standalone session."""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
from glances.globals import WINDOWS
|
from glances.globals import WINDOWS
|
||||||
from glances.logger import logger
|
from glances.logger import logger
|
||||||
@ -128,6 +129,7 @@ class GlancesStandalone(object):
|
|||||||
else:
|
else:
|
||||||
# Nothing is displayed
|
# Nothing is displayed
|
||||||
# Break should be done via a signal (CTRL-C)
|
# Break should be done via a signal (CTRL-C)
|
||||||
|
time.sleep(self.refresh_time - counter.get())
|
||||||
ret = True
|
ret = True
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
Reference in New Issue
Block a user