diff options
author | Jon Renner <rennerjc@gmail.com> | 2013-03-19 10:37:10 +0800 |
---|---|---|
committer | Jon Renner <rennerjc@gmail.com> | 2013-03-19 10:37:10 +0800 |
commit | 5540b0a7674e825d7e64177c5601a0fbc8b325c4 (patch) | |
tree | b8c432b1227e702594a4ce3ed92189d41631ca7e | |
parent | 3feb3b3965d20de2b786e4a43dc9a073c59afbb9 (diff) |
possible solution for issue #215
-rw-r--r-- | glances/glances.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/glances/glances.py b/glances/glances.py index 655b2b76..5e180597 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -3192,6 +3192,9 @@ class GlancesInstance(): """ def __init__(self, cached_time=1): + # cached_time is the minimum time interval between stats updates + # i.e. XML/RPC calls will not retrieve updated info until the time + # since last update is passed (will retrieve old cached info instead) self.timer = Timer(0) self.cached_time = cached_time @@ -3199,7 +3202,7 @@ class GlancesInstance(): # Never update more than 1 time per cached_time if self.timer.finished(): stats.update() - self.timer = Timer(self.cached_time) + self.timer = Timer(self.cached_time) def init(self): # Return the Glances version |