Add offset to the current time

Check that offset can be added to the current time of PTP device associated with the tested network interface.

Scenarios: X3-PTP003.

  1. Find out PTP device associated with the IUT interface, call open() to get its FD.

  2. 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.

  3. 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

Parameters:

env

Testing environment:

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