import pyautogui
import datetime as dt
import time

 

endhope=False
while not endhope:
tim=dt.datetime.now()
if tim.second==0:
pyautogui.click()
endhope=True
print(tim)
elif tim.second>=59 and tim.microsecond>800000:
time.sleep(0.0001)
print(tim)
else:
time.sleep(0.1)
print(tim)