Xenomai
3.0.5
|
Services for reading and spinning on the hardware timer. More...
Data Structures | |
struct | rt_timer_info |
Timer status descriptor. More... | |
Typedefs | |
typedef struct rt_timer_info | RT_TIMER_INFO |
Timer status descriptor. More... | |
Functions | |
static RTIME | rt_timer_read (void) |
Return the current system time. More... | |
SRTIME | rt_timer_ns2ticks (SRTIME ns) |
Convert nanoseconds to Alchemy clock ticks. More... | |
SRTIME | rt_timer_ticks2ns (SRTIME ticks) |
Convert Alchemy clock ticks to nanoseconds. More... | |
void | rt_timer_inquire (RT_TIMER_INFO *info) |
Inquire about the Alchemy clock. More... | |
void | rt_timer_spin (RTIME ns) |
Busy wait burning CPU cycles. More... | |
Services for reading and spinning on the hardware timer.
typedef struct rt_timer_info RT_TIMER_INFO |
Timer status descriptor.
This structure reports information about the Alchemy clock, returned by a call to rt_timer_inquire().
void rt_timer_inquire | ( | RT_TIMER_INFO * | info | ) |
Inquire about the Alchemy clock.
Return status information about the Alchemy clock.
info | The address of a structure to fill with the clock information. |
References rt_timer_info::period.
SRTIME rt_timer_ns2ticks | ( | SRTIME | ns | ) |
Convert nanoseconds to Alchemy clock ticks.
Convert a count of nanoseconds to Alchemy clock ticks. This routine operates on signed nanosecond values. This is the converse call to rt_timer_ticks2ns().
ns | The count of nanoseconds to convert. |
|
inlinestatic |
Return the current system time.
Return the current time maintained by the Xenomai core clock.
void rt_timer_spin | ( | RTIME | ns | ) |
Busy wait burning CPU cycles.
Enter a busy waiting loop for a count of nanoseconds.
Since this service is always called with interrupts enabled, the caller might be preempted by other real-time activities, therefore the actual delay might be longer than specified.
ns | The time to wait expressed in nanoseconds. |
SRTIME rt_timer_ticks2ns | ( | SRTIME | ns | ) |
Convert Alchemy clock ticks to nanoseconds.
Convert a count of Alchemy clock ticks to nanoseconds. This routine operates on signed nanosecond values. This is the converse call to rt_timer_ns2ticks().
ns | The count of nanoseconds to convert. |