RTEMS Logo

RTEMS 4.10.2 On-Line Library


Clock Manager CLOCK_GET_SECONDS_SINCE_EPOCH - Get seconds since epoch

PREV UP NEXT Bookshelf RTEMS C User's Guide

7.4.5: CLOCK_GET_SECONDS_SINCE_EPOCH - Get seconds since epoch

CALLING SEQUENCE:

rtems_status_code rtems_clock_get_seconds_since_epoch(
  rtems_interval *the_interval
);

DIRECTIVE STATUS CODES:

RTEMS_SUCCESSFUL - current time obtained successfully
RTEMS_NOT_DEFINED - system date and time is not set
RTEMS_INVALID_ADDRESS - the_interval is NULL

DESCRIPTION:

This directive returns the number of seconds since the RTEMS epoch and the current system date and time. If the date and time has not been set with a previous call to rtems_clock_set, then the RTEMS_NOT_DEFINED status code is returned.

NOTES:

This directive is callable from an ISR.

This directive will not cause the running task to be preempted. 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-2008 OAR Corporation