So I don’t know much about the python limitations you have but there does appear to be support for high resolution timers.
https://peps.python.org/pep-0564/#annex-clocks-resolution-in-python
Time_ns seasm to be accurate enough and linux and windows to calculate the dt.
It will give you a nano seconds passed that you could covert to seconds.
Not sure if that is helpful. I use the nano time in othe languages all the time for this sort of calculation.