Back to Darwin Xnu

Clock Set Time

osfmk/man/clock_set_time.html

latest1.1 KB
Original Source

clock_set_time


Function - Set the current time.

SYNOPSIS

**kern\_return\_t clock\_set\_time**** (clock\_ctrl\_t **clock\_control,** tvalspec\_t **new\_time** );**

PARAMETERS

clock_control[in clock-control send right] The control port for the clock.

new_time[in structure] New time

DESCRIPTION

The clock_set_time function sets the time kept by a clock. Setting the clock time will cause all pending clock alarms and sleeps to be terminated with timestamps set to the current clock time just prior to the new time being set with a return code of KERN_ABORTED.

CAUTIONS

The use of this function is *Vstrongly discouraged*O since it could affect the monotonically increasing nature of the clock.

RETURN VALUES

Only generic errors apply.

Functions: host_get_clock_control, clock_set_attributes, clock_get_time, clock_alarm, clock_sleep.

Data Structures: tvalspec.