Skip to content

Commit 65a69cb

Browse files
ntmkhanhbrandonwillard
authored andcommitted
Update time.clock() to time.perf_counter() in documentation under tutorial/conditions
1 parent 31b77a2 commit 65a69cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/tutorial/conditions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ IfElse vs Switch
4242

4343
n_times = 10
4444

45-
tic = time.clock()
45+
tic = time.perf_counter()
4646
for i in range(n_times):
4747
f_switch(val1, val2, big_mat1, big_mat2)
48-
print('time spent evaluating both values %f sec' % (time.clock() - tic))
48+
print('time spent evaluating both values %f sec' % (time.perf_counter() - tic))
4949

50-
tic = time.clock()
50+
tic = time.perf_counter()
5151
for i in range(n_times):
5252
f_lazyifelse(val1, val2, big_mat1, big_mat2)
53-
print('time spent evaluating one value %f sec' % (time.clock() - tic))
53+
print('time spent evaluating one value %f sec' % (time.perf_counter() - tic))
5454

5555
.. testoutput::
5656
:hide:

0 commit comments

Comments
 (0)