[Interest] Packet arrival-time resolution? QUdpSocket
Thiago Macieira
thiago.macieira at intel.com
Mon Nov 27 18:54:44 CET 2017
On Monday, 27 November 2017 06:05:16 PST Jason H wrote:
> I was wondering what the maximum packet arrival time granularity is for Qt
> (On linux) using a normal timestamp, I can easily do 1ms. However if I was
> dealing with a raw socket descriptor, timing below this there is a ioctl()
> call I can do to get a lower resolution for the packet arrival time. I'm
> not sure how well this would play with Qt's internals though. For now my
> packet is UDP, but if needed, I'd like to be able to extend it to TCP. I'm
> trying to time sync 2-3 systems on the same LAN. Ultimately, actual time of
> day isn't needed, just the amount of time of travel between the hosts. On a
> RaspberyPi zero
>
> Has anyone done anything like this? Any tips? Many thanks in advance.
If you can find out what the ioctls() or, even better, the getsockopt() calls,
I can add this as a feature to QNetworkDatagram.
Obviously, this will not apply to TCP. If you need the time and you're using
TCP, you're doing something wrong.
If you're going to sync time, use NTP.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list