About 140,000 results
Open links in new tab
  1. How do I measure elapsed time in Python? - Stack Overflow

    The python cProfile and pstats modules offer great support for measuring time elapsed in certain functions without having to add any code around the existing functions.

  2. time - how do I make a Timer in Python - Stack Overflow

    Nov 21, 2021 · How do you create a timer in python? My project is a speed typing test and the timer is there to time the length it takes the user to type. The first task the user types is the …

  3. time - Creating a timer in python - Stack Overflow

    Aug 23, 2013 · Creating a timer in python Asked 12 years, 2 months ago Modified 2 years, 6 months ago Viewed 316k times

  4. python - How to create a timer to tell how long the code has been ...

    Oct 14, 2024 · You record the start time, then later on calculate the difference between that start time and the current time. Due to platform differences, for precision you want to use the …

  5. python - How to repeatedly execute a function every x seconds?

    506 I want to repeatedly execute a function in Python every 60 seconds forever (just like an NSTimer in Objective C or setTimeout in JS). This code will run as a daemon and is effectively …

  6. Pythonのthreading.Timerで定期的に処理を呼び出すサンプル

    May 2, 2016 · スレッド数の挙動に関しては hello 関数内で t.start() がよばれた後そのスレッドは破棄されます. 言及されているように t.start() の後に無限ループするコードを追加するとス …

  7. How to make a timer program in Python - Stack Overflow

    Here is my goal: To make a small program (text based) that will start with a greeting, print out a timer for how long it has been since the last event, and then a timer for the event. I have used t...

  8. python - Non-polling/Non-blocking Timer? - Stack Overflow

    Jan 6, 2019 · The best solution I've found so far is to just use the sleep() function. I'd like to run my own callback function when the event of a timer expiration happens. Is there any event …

  9. python - How do I make a time delay? - Stack Overflow

    The upside of this method is that while the Timer thread was waiting, I was able to do other things, in this case, hitting Enter one time - before the function executed (see the first empty prompt). …

  10. time - Timer for Python game - Stack Overflow

    May 4, 2011 · 3 The threading.Timer object (documentation) can count the ten seconds, then get it to set an Event flag indicating that the loop should exit. The documentation indicates that the …