The rtems_clock_get
directive allows a task or an ISR to
obtain the current date and time or date and time related
information. The current date and time can be returned in
either native or UNIX-style format. Additionally, the
application can obtain date and time related information such as
the number of seconds since the RTEMS epoch, the number of ticks
since the executive was initialized, and the number of ticks per
second. The information returned by the
rtems_clock_get
directive is
dependent on the option selected by the caller. This
is specified using one of the following constants
associated with the enumerated type
rtems_clock_get_options
:
RTEMS_CLOCK_GET_TOD
- obtain native style date and time
RTEMS_CLOCK_GET_TIME_VALUE
- obtain UNIX-style
date and time
RTEMS_CLOCK_GET_TICKS_SINCE_BOOT
- obtain number of ticks
since RTEMS was initialized
RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH
- obtain number
of seconds since RTEMS epoch
RTEMS_CLOCK_GET_TICKS_PER_SECOND
- obtain number of clock
ticks per second
Calendar time operations will return an error code if invoked before the date and time have been set.
Copyright © 1988-2008 OAR Corporation