What is adjtime?

What is adjtime?

The adjtime() function makes small adjustments to the system clock, either slowing it down or speeding it up by the time specified in the delta parameter up to a maximum of two hours. If delta is negative, the clock is slowed down by incrementing it more slowly than normal until the correction is complete.

What is Adjtime in Linux?

The adjtime() function gradually adjusts the system clock (as returned by gettimeofday(2)). The amount of time by which the clock is to be adjusted is specified in the structure pointed to by delta. If the adjustment in delta is negative, then the clock is slowed down in a similar fashion.

What is the purpose of adjtime in Linux?

adjtime() is intended to be used to make small adjustments to the system time. Most systems impose a limit on the adjustment that can be specified in delta.

When to use adjtime to adjust system time?

Using adjtime () to adjust the time prevents the problems that can be caused for certain applications (e.g., make (1)) by abrupt positive or negative jumps in the system time. adjtime () is intended to be used to make small adjustments to the system time. Most systems impose a limit on the adjustment that can be specified in delta.

What does time in mean in adjtimex ( 2 )?

TIME_INS Indicates that a leap second will be added at the end of the UTC day. TIME_DEL Indicates that a leap second will be deleted at the end of the UTC day. TIME_OOP Insertion of a leap second is in progress. TIME_WAIT A leap-second insertion or deletion has been completed.

How does the system call adjtimex ( ) work?

The system call adjtimex () reads and optionally sets adjustment parameters for this algorithm. It takes a pointer to a timex structure, updates kernel parameters from field values, and returns the same structure with current kernel values. This structure is declared as follows: