RTEMS
Files | Macros | Functions
Clock Manager

The Clock Manager provides support for time of day and other time related capabilities. More...

Files

file  clock.h
 This header file defines the Clock Manager API.
 

Macros

#define rtems_clock_get_ticks_per_second()   _Watchdog_Ticks_per_second
 %
 
#define rtems_clock_get_ticks_since_boot()   _Watchdog_Ticks_since_boot
 %
 

Functions

rtems_status_code rtems_clock_get_seconds_since_epoch (rtems_interval *the_interval)
 % More...
 
rtems_status_code rtems_clock_get_tod (rtems_time_of_day *time_buffer)
 % More...
 
rtems_status_code rtems_clock_get_tod_timeval (struct timeval *time)
 % More...
 
rtems_status_code rtems_clock_get_uptime (struct timespec *uptime)
 % More...
 
uint64_t rtems_clock_get_uptime_nanoseconds (void)
 %
 
time_t rtems_clock_get_uptime_seconds (void)
 %
 
void rtems_clock_get_uptime_timeval (struct timeval *uptime)
 % More...
 
rtems_status_code rtems_clock_set (const rtems_time_of_day *time_buffer)
 % More...
 
rtems_status_code rtems_clock_tick (void)
 %
 
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 tick value and false otherwise. More...
 
static rtems_interval rtems_clock_tick_later (rtems_interval delta)
 Returns the ticks counter value delta ticks in the future. More...
 
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. More...
 

Detailed Description

The Clock Manager provides support for time of day and other time related capabilities.

Function Documentation

◆ rtems_clock_get_seconds_since_epoch()

rtems_status_code rtems_clock_get_seconds_since_epoch ( rtems_interval the_interval)

%

Parameters
the_interval%

◆ rtems_clock_get_tod()

rtems_status_code rtems_clock_get_tod ( rtems_time_of_day time_buffer)

%

Parameters
time_buffer%

◆ rtems_clock_get_tod_timeval()

rtems_status_code rtems_clock_get_tod_timeval ( struct timeval *  time)

%

Parameters
time%

◆ rtems_clock_get_uptime()

rtems_status_code rtems_clock_get_uptime ( struct timespec *  uptime)

%

Parameters
uptime%

Definition at line 39 of file clockgetuptime.c.

◆ rtems_clock_get_uptime_timeval()

void rtems_clock_get_uptime_timeval ( struct timeval *  uptime)

%

Parameters
uptime%

◆ rtems_clock_set()

rtems_status_code rtems_clock_set ( const rtems_time_of_day time_buffer)

%

Parameters
time_buffer%

◆ rtems_clock_tick_before()

static bool rtems_clock_tick_before ( rtems_interval  tick)
inlinestatic

Returns true if the current ticks counter value indicates a time before the time specified by the tick value and false otherwise.

This directive can be used to write busy loops with a timeout.

Parameters
tickis the tick value.
Return values
trueThe current ticks counter value indicates a time before the time specified by the tick value.
falseOtherwise.

Definition at line 211 of file clock.h.

◆ rtems_clock_tick_later()

static rtems_interval rtems_clock_tick_later ( rtems_interval  delta)
inlinestatic

Returns the ticks counter value delta ticks in the future.

Parameters
deltais the ticks delta value.
Returns
The tick counter value delta ticks in the future is returned.

Definition at line 227 of file clock.h.

◆ rtems_clock_tick_later_usec()

static rtems_interval rtems_clock_tick_later_usec ( rtems_interval  delta_in_usec)
inlinestatic

Returns the ticks counter value at least delta microseconds in the future.

Parameters
delta_in_usecis the delta value in microseconds.
Returns
The tick counter value delta ticks in the future is returned.

Definition at line 244 of file clock.h.