.. index:: pair: group; Add offset to the current time .. _doxid-group__ptp-adj__setoffset: Add offset to the current time ============================== .. toctree:: :hidden: Check that offset can be added to the current time of PTP device associated with the tested network interface. Scenarios: X3-PTP003. #. Find out PTP device associated with the IUT interface, call **open()** to get its FD. #. Use **clock_adjtime()** to add **time_offset** seconds to the current time on the PTP device. With help of **clock_gettime()** check whether the clock works as expected after that. #. Use **clock_adjtime()** to subtract **time_offset** seconds from the current time on the PTP device. With help of **clock_gettime()** check whether the clock works as expected after that. Yurij Plotnikov `Yurij.Plotnikov@arknetworks.am `__ .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer ` * - time_offset - Time offset to add, in seconds * - min_sleep - Minimum time to sleep between clock_gettime() calls when checking how the clock advances, seconds * - max_sleep - Maximum time to sleep between clock_gettime() calls when checking how the clock advances, seconds