Python Forum
Is there a max value for threading.Timer function?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a max value for threading.Timer function?
#1
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?
Reply
#2
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
swallow osama bin laden
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Concurrent futures threading running at same speed as non-threading billykid999 13 1,811 May-03-2023, 08:22 AM
Last Post: billykid999
  using threading.Timer for function korenron 1 1,193 Dec-20-2022, 01:09 PM
Last Post: ndc85430
  Tutorials on sockets, threading and multi-threading? muzikman 2 2,114 Oct-01-2021, 08:32 PM
Last Post: muzikman
  email timer/rss feed timer ndiniz 1 2,077 Feb-02-2021, 07:18 PM
Last Post: nilamo
  Run a timer when a functions starts to see how long the function takes to complete Pedroski55 2 1,994 Apr-19-2020, 06:28 AM
Last Post: Pedroski55
  Help with Stopping a function after a timer SheeppOSU 0 1,928 Jan-28-2019, 10:13 PM
Last Post: SheeppOSU
  code keeps running if i use from threading import timer? birddseedd 3 2,591 Jan-25-2019, 05:00 AM
Last Post: stullis
  Cannot use function with timer/clock theangryprogrammer 1 3,317 Jan-22-2019, 04:22 PM
Last Post: Larz60+
  Threading timer crashes my App panoss 4 6,492 Jun-05-2017, 05:57 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020