datetime - Python - time: how to check if seconds == 00 -


in script want run function when seconds 00. example if start script @ 8:12:32, want function start @ 8:13:00. have tried use datetime.datetime.now() haven't figured out how sort out seconds time. in python 3 documentation have found time.second , datetime.second haven't had success using them.

import datetime, time delta = 60 - datetime.datetime.now().second time.sleep(delta) 

the next statement executed on minute (hh:mm:00).


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -