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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -