53 #ifndef _RTEMS_RTEMS_CLOCK_H 54 #define _RTEMS_RTEMS_CLOCK_H 59 #include <rtems/config.h> 60 #include <sys/_timespec.h> 61 #include <sys/_timeval.h> 101 #define rtems_clock_get_ticks_per_second() _Watchdog_Ticks_per_second 110 #define rtems_clock_get_ticks_since_boot() _Watchdog_Ticks_since_boot 257 + ( delta_in_usec + us_per_tick - 1 ) / us_per_tick;
rtems_status_code rtems_clock_get_tod(rtems_time_of_day *time_buffer)
%
This header file defines types provided by the Classic API.
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
static rtems_interval rtems_clock_tick_later_usec(rtems_interval delta_in_usec)
Returns the ticks counter value at least delta microseconds in the future.
time_t rtems_clock_get_uptime_seconds(void)
%
This header file defines the status codes and support functions of the Classic API.
Watchdog_Interval _TOD_To_seconds(const rtems_time_of_day *the_tod)
%
This type is used to represent the calendar time in the Classic API.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
void rtems_clock_get_uptime_timeval(struct timeval *uptime)
%
uint64_t rtems_clock_get_uptime_nanoseconds(void)
%
rtems_status_code rtems_clock_get_seconds_since_epoch(rtems_interval *the_interval)
%
rtems_status_code rtems_clock_get_uptime(struct timespec *uptime)
%
#define rtems_configuration_get_microseconds_per_tick()
Returns the number of microseconds per clock tick configured for this application.
Watchdog_Interval rtems_interval
This type is used to represent clock tick intervals.
rtems_status_code rtems_clock_get_tod_timeval(struct timeval *time)
%
Constants for the watchdog ticks.
static rtems_interval rtems_clock_tick_later(rtems_interval delta)
Returns the ticks counter value delta ticks in the future.
rtems_status_code rtems_clock_set(const rtems_time_of_day *time_buffer)
%
static bool rtems_clock_tick_before(rtems_interval tick)
Returns true if the current ticks counter value indicates a time before the time specified by the tic...
volatile Watchdog_Interval _Watchdog_Ticks_since_boot
The watchdog ticks counter.
bool _TOD_Validate(const rtems_time_of_day *the_tod)
%
rtems_status_code rtems_clock_tick(void)
%