Fresco/Fresco-Python-demos/src clock,1.9,1.10
Nick Lewycky <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Fresco-Python-demos/src
In directory purcel:/tmp/cvs-serv11795
Modified Files:
clock
Log Message:
Update the hour and minute hands with each motion of the second hand,
like a real analog clock.
Index: clock
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Python-demos/src/clock,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- clock 4 Mar 2003 05:31:45 -0000 1.9
+++ clock 6 Mar 2003 16:03:46 -0000 1.10
@@ -106,6 +106,8 @@
# Get time
times = time.localtime(time.time())
hours, mins, secs = times[3], times[4], times[5]
+ mins += secs / 60.
+ hours += mins / 60.
# Hours
vertices = [(-.03,.03),(0,-.6),(.03,.03),(-.03,.03)]
path.nodes = map(scale, rotate(hours*circle/12, vertices))