Is there a way to get high precision system time in python?
I have a small application for working with a virtual COM port. I want to measure the time interval between sending a message and receiving it.
Currently it works as follows:
I get a message, use
time.time()
and add 20 messages to the message. The client application receives this message and receives
time.time()
then calculates their differences. In most cases, the time interval (as expected) is zero.
Question: is there a way to do this more intelligently and with greater accuracy?
source
share