.. index:: pair: group; Check PTP_SYS_OFFSET_PRECISE ioctl .. _doxid-group__ptp-sys__offset__precise: Check PTP_SYS_OFFSET_PRECISE ioctl ================================== .. toctree:: :hidden: Check that ``PTP_SYS_OFFSET_PRECISE`` ioctl can be used to obtain PTP device time and system time at the same moment. #. Find out PTP device associated with the IUT interface, call **open()** to get its FD. #. Call **ioctl** (``PTP_SYS_OFFSET_PRECISE``) on the PTP device FD to get timestamps for PTP device, ``CLOCK_REALTIME`` and ``CLOCK_MONOTONIC_RAW`` at the same moment. #. Estimate difference between PTP clock and ``CLOCK_REALTIME`` as **device** - **sys_realtime** in obtained response. Check that two consecutive **clock_gettime()** calls on PTP device and ``CLOCK_REALTIME`` show similar difference between timestamps. #. Estimate difference between PTP clock and ``CLOCK_MONOTONIC_RAW`` as **device** - **sys_monoraw** in obtained response. Check that two consecutive **clock_gettime()** calls on PTP device and ``CLOCK_MONOTONIC_RAW`` show similar difference between timestamps. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer `