when uses time.clock,there are always mistakes

Rhodri James rhodri at kynesim.co.uk
Mon Feb 3 08:54:10 EST 2020


On 03/02/2020 08:04, 石盼 wrote:
> Hello !
>  The problem like this:
>      		================================ RESTART: Shell ================================
>   >>> import time
>   >>> t = time.clock()
>   Traceback (most recent call last):
>    			File "<pyshell#5>", line 1, in <module>
>    			  t = time.clock()
>   AttributeError: module 'time' has no attribute 'clock'

It is correct, there is no time.clock() function.  The documentation is 
here: https://docs.python.org/3/library/time.html

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-list mailing list