Your scheduler is based on os.clock(), which returns an approximation of the amount in seconds of CPU time used by the program.
It's only working, because the main loop is consuming 100% cpu time.
The solution is to replace os.clock() with socket.gettime()
Your scheduler is based on os.clock(), which returns an approximation of the amount in seconds of CPU time used by the program.
It's only working, because the main loop is consuming 100% cpu time.
The solution is to replace os.clock() with socket.gettime()