Is there a better solution instead for using the sleep command with Python on a raspberry pi board?
My Python program has sleep(1)
, which means one second delay and when the code has run for 3600 times it runs a MySQL insert command.
The problem is that the “delay” is not of all accurate. It may be a 1-2 minutes difference after every 3600 seconds when it runs the MySQL insert command.
Some info about my environment.
- Python version: 3.10.12
- Ubuntu version: 22.04.4 LTS
- Board version: Raspberry Pi 4 Model B Rev 1.5*
This problem is new!
4