Feb-02-2018, 11:12 PM
I was trying to pass 7 days in seconds to the threading.Timer() function, since threading.Timer() takes seconds as a duration.
That makes about 605000 seconds. But when I fire threading.Timer() with like 60 seconds, no problem at all.
But when I pass in the 605000s as duration, the timer fires instantly.
So is there a max value for the duration in threading.Timer()?
Or if not, why does it fire instantly on such a big value?
And also, is it more efficient to just use datetime.timedelta and compare the time every 605000 sec?
That makes about 605000 seconds. But when I fire threading.Timer() with like 60 seconds, no problem at all.
But when I pass in the 605000s as duration, the timer fires instantly.
So is there a max value for the duration in threading.Timer()?
Or if not, why does it fire instantly on such a big value?
And also, is it more efficient to just use datetime.timedelta and compare the time every 605000 sec?