Return delta to current time in getTime()

This commit is contained in:
Klaus-Uwe Mitterer 2017-02-21 23:06:36 +01:00
parent aea2cec4c7
commit 844a522c0a

View file

@ -41,7 +41,7 @@ def getTime(now = datetime.datetime.now()):
thenhour = now.hour + 1 if thenminute == 0 else now.hour
then = datetime.datetime(now.year, now.month, now.day, thenhour, thenminute, 0)
return (then - now).seconds
return (then - datetime.datetime.now()).seconds
if __name__ == "__main__":
os.nice(5)