34 #define TM_ONESHOT XN_APERIODIC_TICK
48 #if defined(__KERNEL__) || defined(__XENO_SIM__)
52 #include <asm-generic/xenomai/timeconv.h>
55 extern xntbase_t *__native_tbase;
63 #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
66 return xnarch_ns_to_tsc(ns);
71 return xnarch_tsc_to_ns(ticks);
76 return xnarch_get_cpu_tsc();
86 return xntbase_ns2ticks(__native_tbase, ns);
91 return xntbase_ticks2ns(__native_tbase, ticks);
SRTIME rt_timer_ns2tsc(SRTIME ns)
Convert nanoseconds to local CPU clock ticks.
Definition: timer.c:70
static xnticks_t xntbase_get_time(xntbase_t *base)
Get the clock time for a given time base.
Definition: timebase.h:301
void rt_timer_spin(RTIME ns)
Busy wait burning CPU cycles.
Definition: timer.c:124
int rt_timer_inquire(RT_TIMER_INFO *info)
Inquire about the timer.
Definition: timer.c:73
Structure containing timer-information useful to users.
Definition: timer.h:40
int rt_timer_set_mode(RTIME nstick)
Set the system clock rate.
Definition: timer.c:173
SRTIME rt_timer_tsc2ns(SRTIME ticks)
Convert local CPU clock ticks to nanoseconds.
Definition: timer.c:75
RTIME rt_timer_tsc(void)
Return the current TSC value.
Definition: timer.c:41
SRTIME rt_timer_ns2ticks(SRTIME ns)
Convert nanoseconds to internal clock ticks.
Definition: timer.c:54
This file is part of the Xenomai project.
SRTIME rt_timer_ticks2ns(SRTIME ticks)
Convert internal clock ticks to nanoseconds.
Definition: timer.c:62
RTIME rt_timer_read(void)
Return the current system time.
Definition: timer.c:33
struct rt_timer_info RT_TIMER_INFO
Structure containing timer-information useful to users.