How to Solve NameError: name 'perf_counter' is not defined -- time

Solution: Import the 'perf_counter' module

To Solve the error, add the following line to the top of your code.

from time import perf_counter

 

For more information:
Python time perf_counter