How do I keep track of time constantly without the use of threads? I’m asking this as threads in python are generally looked down on especially because it “adds complexity” to any program. My program needs to receive/send WiFi commands, receive/send XBee(Serial) commands, as well as keeping track of time constantly.
What is the best solution to this? Should I go ahead and use threads or is there an alternative solution?
Outside of threading/multiprocessing, you can also use timer signals, which might be a little easier than “instrumenting the program” to do the calls itself, or otherwise creating your own main loop.