[Solved] AttributeError: module ‘time‘ has no attribute ‘clock‘

preface:

When the blogger runs the previous code, he encounters this problem because time method is not available in the higher version of Python.

Running code:

Error:

Traceback (most recent call last):
  File "/media/gis/DISCK_21/code/CoANet-main/process/create_crops.py", line 139, in <module>
    main()
  File "/media/gis/DISCK_21/code/CoANet-main/process/create_crops.py", line 118, in main
    start = time.clock()
AttributeError: module 'time' has no attribute 'clock'

Solution:

start = time.time()

Read More: