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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

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

c# - Search and Add Comment with OpenXML for Word -