mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
time.clock() now emits a DeprecationWarning (GH-4020)
bpo-31803: time.clock() and time.get_clock_info('clock') now emit a DeprecationWarning warning. Replace time.clock() with time.perf_counter() in tests and demos. Remove also hasattr(time, 'monotonic') in test_time since time.monotonic() is now always available since Python 3.5.
This commit is contained in:
parent
de86073a76
commit
884d13a55f
14 changed files with 39 additions and 20 deletions
|
@ -16,7 +16,7 @@ the current pen is cloned. So in the end
|
|||
there are 1024 turtles.
|
||||
"""
|
||||
from turtle import Turtle, mainloop
|
||||
from time import clock
|
||||
from time import perf_counter as clock
|
||||
|
||||
def tree(plist, l, a, f):
|
||||
""" plist is list of pens
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue