.. index:: pair: group; Set clock time .. _doxid-group__ptp-set__time: Set clock time ============== .. toctree:: :hidden: Check that time can be set for PTP device associated with the tested network interface. Scenarios: X3-PTP001. #. Find out PTP device associated with the IUT interface, call **open()** to get its FD. #. Get initial timestamp from the PTP device. #. Call **clock_settime()** to set current time for the PTP device according to **ts**. #. Call **clock_gettime()** to get current time from the PTP device, check that difference from the previously set value is not big. #. Sleep for a while (between **min_sleep** and **max_sleep** seconds). #. Call **clock_gettime()** to get another timestamp from the PTP device. Check that the timestamp advanced according to the delay between calls. Yurij Plotnikov `Yurij.Plotnikov@arknetworks.am `__ .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Testing environment: * :ref:`env.peer2peer ` * - ts - Timestamp to set, in seconds (negative value means current time) * - min_sleep - Minimum time to sleep between clock_gettime() calls, seconds * - max_sleep - Maximum time to sleep between clock_gettime() calls, seconds