Python Forum

Full Version: Is there a max value for threading.Timer function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
i tested this in python 2.7 with threading object obj = threading.Timer(605000,func,[arg]) and run obj.start() without probs at all, it wont fire instantly