Make clock blink
authorBernard Blackham <[email protected]>
Sat, 7 May 2005 10:26:11 +0000 (10:26 +0000)
committerBernard Blackham <[email protected]>
Sat, 7 May 2005 10:26:11 +0000 (10:26 +0000)
sql-edition/servers/Idler.py

index d11fe90..22285de 100755 (executable)
@@ -240,7 +240,9 @@ class ClockIdler(Idler):
                self.last = None
 
        def next(self):
-               output = time.strftime("%H:%M:%S")
+               colonchar = ':'
+               if int(time.time()*2) & 1: colonchar = ' '
+               output = time.strftime("%%H%c%%M%c%%S"%(colonchar,colonchar))
                if output != self.last:
                        self.v.display(" %8.8s " % (output))
                        self.last = output

UCC git Repository :: git.ucc.asn.au