Is there any way of obtaining high-precision system time in python?
I have a little application to work with virtual COM-port. I want to measure the time interval between the sending of the message and its receiving.
At the moment it works like this:
I obtain the message, use
time.time()
and append its 20 digits to the message. The client application receives this message and gets
time.time()
again, then calculates their differences. At the most of the cases the time interval (as i expected) equals zero.
The question is: is there any way of doing this in more intelligent way and with more precision?