rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer );
RTEMS_SUCCESSFUL
- date and time set successfully
RTEMS_INVALID_ADDRESS
- time_buffer
is NULL
RTEMS_INVALID_CLOCK
- invalid time of day
This directive sets the system date and time. The date, time, and ticks in the time_buffer structure are all range-checked, and an error is returned if any one is out of its valid range.
Years before 1988 are invalid.
The system date and time are based on the configured tick rate (number of microseconds in a tick).
Setting the time forward may cause a higher priority task, blocked waiting on a specific time, to be made ready. In this case, the calling task will be preempted after the next clock tick.
Re-initializing RTEMS causes the system date and time
to be reset to an uninitialized state. Another call to
rtems_clock_set
is required to re-initialize
the system date and time to application specific specifications.
Copyright © 1988-2007OAR Corporation