diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2017-10-17 21:46:45 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-17 21:46:45 (GMT) |
| commit | 884d13a55fc328e2e1e3948a82b361b30804b818 (patch) | |
| tree | 8b68f04b9261c26d4f2f5ed7a7beaa1d31c236c0 /Lib/turtledemo/tree.py | |
| parent | de86073a761cd3539aaca6f886a1f55effc0d9da (diff) | |
| download | cpython-884d13a55fc328e2e1e3948a82b361b30804b818.zip cpython-884d13a55fc328e2e1e3948a82b361b30804b818.tar.gz cpython-884d13a55fc328e2e1e3948a82b361b30804b818.tar.bz2 | |
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.
Diffstat (limited to 'Lib/turtledemo/tree.py')
| -rwxr-xr-x | Lib/turtledemo/tree.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/turtledemo/tree.py b/Lib/turtledemo/tree.py index 71fff35..9998fa8 100755 --- a/Lib/turtledemo/tree.py +++ b/Lib/turtledemo/tree.py @@ -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 |
