-2
I saw that you are using python 3.8 and time clock. was discontinued so try using time.process_time() in your case would t. process_time().
A hint: it would be much easier if I could run your code to test the changes would make my answer more effective without me having to type in a new code so smp q possible send the code that does not work in the question. :)