26 #ifndef _RTEMS_RTEMS_CLOCK_H 27 #define _RTEMS_RTEMS_CLOCK_H 31 #include <rtems/config.h> 137 rtems_interval us_per_tick = rtems_configuration_get_microseconds_per_tick();
144 + (delta_in_usec + us_per_tick - 1) / us_per_tick + 1;
194 #define rtems_clock_get_ticks_per_second() ( _Watchdog_Ticks_per_second ) 242 struct timespec *uptime
rtems_status_code rtems_clock_get_seconds_since_epoch(rtems_interval *the_interval)
Obtain Seconds Since Epoch.
Definition: clockgetsecondssinceepoch.c:24
bool _TOD_Validate(const rtems_time_of_day *the_tod)
TOD Validate.
Definition: clocktodvalidate.c:36
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:127
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
RTEMS_INLINE_ROUTINE rtems_interval rtems_clock_get_ticks_since_boot(void)
Gets the current ticks counter value.
Definition: clock.h:106
RTEMS_INLINE_ROUTINE rtems_interval rtems_clock_tick_later_usec(rtems_interval delta_in_usec)
Returns the ticks counter value at least delta microseconds in the future.
Definition: clock.h:133
rtems_status_code rtems_clock_get_tod(rtems_time_of_day *time_buffer)
Obtain Current Time of Day (Classic TOD)
Definition: clockgettod.c:83
rtems_status_code rtems_clock_tick(void)
Announce a Clock Tick.
Definition: clocktick.c:25
rtems_status_code rtems_clock_get_tod_timeval(struct timeval *time)
Obtain TOD in struct timeval Format.
Definition: clockgettodtimeval.c:24
Data structure to manage and manipulate calendar time.
Definition: types.h:141
rtems_status_code
Classic API Status.
Definition: status.h:43
#define rtems_clock_get_ticks_per_second()
Obtain Ticks Per Seconds.
Definition: clock.h:194
RTEMS_INLINE_ROUTINE 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...
Definition: clock.h:174
rtems_status_code rtems_clock_set(const rtems_time_of_day *time_buffer)
Set the Current TOD.
Definition: clockset.c:25
Watchdog_Interval _TOD_To_seconds(const rtems_time_of_day *the_tod)
TOD to Seconds.
Definition: clocktodtoseconds.c:45
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdogticks.h:36
uint64_t rtems_clock_get_uptime_nanoseconds(void)
Returns the system uptime in nanoseconds.
Definition: clockgetuptimenanoseconds.c:24
rtems_status_code rtems_clock_get_uptime(struct timespec *uptime)
Obtain the System Uptime.
Definition: clockgetuptime.c:38
RTEMS_INLINE_ROUTINE rtems_interval rtems_clock_tick_later(rtems_interval delta)
Returns the ticks counter value delta ticks in the future.
Definition: clock.h:118
void rtems_clock_get_uptime_timeval(struct timeval *uptime)
Gets the System Uptime in the Struct Timeval Format.
Definition: clockgetuptimetimeval.c:30
volatile Watchdog_Interval _Watchdog_Ticks_since_boot
The watchdog ticks counter.
Definition: watchdogtickssinceboot.c:29
time_t rtems_clock_get_uptime_seconds(void)
Returns the system uptime in seconds.
Definition: clockgetuptimeseconds.c:28