read_u4le() does not provide values with precision
I was parsing pcap files, and due to the necessity to work with milliseconds, I needed to extract the packet's timestamp when it was captured. However, when the millisecond's values begin with zeros, the returned value omit them. For example:
1525114964.006586000: the result of pkt.ts_usec() = 6586
1525114964.014137000: the result of pkt.ts_usec() = 14137
I found that this function returns always a value with a length of 6 when there are no zeros on the left side, otherwise, it returns a 6 - number of zeros on the left.
In order to get the value with precision, I pad the value with zeros on the left:
Example in python:
str(6586).zfill(6) = 006586
str(14137).zfill(6) = 014137
I hope it helps you :)