提交 65a69cbb authored 作者: ntmkhanh's avatar ntmkhanh 提交者: Brandon T. Willard

Update time.clock() to time.perf_counter() in documentation under tutorial/conditions

上级 31b77a2e
......@@ -42,15 +42,15 @@ IfElse vs Switch
n_times = 10
tic = time.clock()
tic = time.perf_counter()
for i in range(n_times):
f_switch(val1, val2, big_mat1, big_mat2)
print('time spent evaluating both values %f sec' % (time.clock() - tic))
print('time spent evaluating both values %f sec' % (time.perf_counter() - tic))
tic = time.clock()
tic = time.perf_counter()
for i in range(n_times):
f_lazyifelse(val1, val2, big_mat1, big_mat2)
print('time spent evaluating one value %f sec' % (time.clock() - tic))
print('time spent evaluating one value %f sec' % (time.perf_counter() - tic))
.. testoutput::
:hide:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论