RTEMS Logo

RTEMS 4.8.0 On-Line Library


Clock Manager CLOCK_SET - Set system date and time

PREV UP NEXT Bookshelf RTEMS C User's Guide

7.4.1: CLOCK_SET - Set system date and time

CALLING SEQUENCE:

rtems_status_code rtems_clock_set(
  rtems_time_of_day *time_buffer
);

DIRECTIVE STATUS CODES:

RTEMS_SUCCESSFUL - date and time set successfully
RTEMS_INVALID_ADDRESS - time_buffer is NULL
RTEMS_INVALID_TIME_OF_DAY - invalid time of day

DESCRIPTION:

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.

NOTES:

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.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2007OAR Corporation