aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources/Clock.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-06-15 17:34:06 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-06-15 17:34:06 +0000
commit2e874fa14264bf37f17ae9b9375e26059e7f35ec (patch)
treeceb5244659b57714fb4609914f3146630f045c4a /lib/python/Components/Sources/Clock.py
parente131b75fd194db84a37f2395b5ab88093e09192f (diff)
downloadenigma2-2e874fa14264bf37f17ae9b9375e26059e7f35ec.tar.gz
enigma2-2e874fa14264bf37f17ae9b9375e26059e7f35ec.zip
add new skin stuff
Diffstat (limited to 'lib/python/Components/Sources/Clock.py')
-rw-r--r--lib/python/Components/Sources/Clock.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/python/Components/Sources/Clock.py b/lib/python/Components/Sources/Clock.py
new file mode 100644
index 00000000..f840ea24
--- /dev/null
+++ b/lib/python/Components/Sources/Clock.py
@@ -0,0 +1,22 @@
+from Tools.Event import Event
+from enigma import eTimer
+import time
+
+from Source import Source
+
+class Clock(Source):
+ def __init__(self):
+ self.changed = Event(start=self.start, stop=self.stop)
+ self.clock_timer = eTimer()
+ self.clock_timer.timeout.get().append(self.changed)
+
+ def start(self):
+ self.clock_timer.start(1000)
+
+ def stop(self):
+ self.clock_timer.stop()
+
+ def getClock(self):
+ return time.time()
+
+ time = property(getClock)