diff options
Diffstat (limited to 'lib/python/Components/Sources')
| -rw-r--r-- | lib/python/Components/Sources/Clock.py | 8 | ||||
| -rw-r--r-- | lib/python/Components/Sources/FrontendStatus.py | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/python/Components/Sources/Clock.py b/lib/python/Components/Sources/Clock.py index e2d7faa7..7f1a8d7f 100644 --- a/lib/python/Components/Sources/Clock.py +++ b/lib/python/Components/Sources/Clock.py @@ -18,3 +18,11 @@ class Clock(Source): def poll(self): self.changed((self.CHANGED_POLL,)) + + def doSuspend(self, suspended): + if suspended: + self.clock_timer.stop() + else: + self.clock_timer.start(1000) + self.poll() + diff --git a/lib/python/Components/Sources/FrontendStatus.py b/lib/python/Components/Sources/FrontendStatus.py index f1402f11..352b9fdc 100644 --- a/lib/python/Components/Sources/FrontendStatus.py +++ b/lib/python/Components/Sources/FrontendStatus.py @@ -37,3 +37,10 @@ class FrontendStatus(Source): return service and service.frontendInfo() else: return None + + def doSuspend(self, suspended): + if suspended: + self.poll_timer.stop() + else: + self.poll_timer.start(1000) + |
