RTEMS Logo

RTEMS 4.9.2 On-Line Library


Clock Manager CLOCK_SET - Set date and time

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

7.4.1: CLOCK_SET - Set date and time

CALLING SEQUENCE:

procedure Clock_Set (
   Time_Buffer : in     RTEMS.Time_Of_Day;
   Result      :    out RTEMS.Status_Codes
);

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - date and time set successfully
RTEMS.INVALID_ADDRESS - time_buffer is NULL
RTEMS.INVALID_CLOCK - invalid time of day

DESCRIPTION:

This directive sets the system date and time. The date, time, and ticks in the time_buffer record 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 Ada User's Guide

Copyright © 1988-2008 OAR Corporation