MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / tick

Function tick

tools/python-3.11.9-amd64/Lib/turtledemo/clock.py:96–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 return "%s %d %d" % (m, t, j)
95
96def tick():
97 t = datetime.today()
98 sekunde = t.second + t.microsecond*0.000001
99 minute = t.minute + sekunde/60.0
100 stunde = t.hour + minute/60.0
101 try:
102 tracer(False) # Terminator can occur here
103 writer.clear()
104 writer.home()
105 writer.forward(65)
106 writer.write(wochentag(t),
107 align="center", font=("Courier", 14, "bold"))
108 writer.back(150)
109 writer.write(datum(t),
110 align="center", font=("Courier", 14, "bold"))
111 writer.forward(85)
112 second_hand.setheading(6*sekunde) # or here
113 minute_hand.setheading(6*minute)
114 hour_hand.setheading(30*stunde)
115 tracer(True)
116 ontimer(tick, 100)
117 except Terminator:
118 pass # turtledemo user pressed STOP
119
120def main():
121 tracer(False)

Callers 1

mainFunction · 0.85

Calls 9

wochentagFunction · 0.85
datumFunction · 0.85
todayMethod · 0.80
setheadingMethod · 0.80
clearMethod · 0.45
homeMethod · 0.45
forwardMethod · 0.45
writeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected