Files | |
file | timer.c |
This file is part of the Xenomai project. | |
Functions | |
SRTIME | rt_timer_ns2ticks (SRTIME ns) |
Convert nanoseconds to internal clock ticks. | |
SRTIME | rt_timer_ns2tsc (SRTIME ns) |
Convert nanoseconds to local CPU clock ticks. | |
SRTIME | rt_timer_ticks2ns (SRTIME ticks) |
Convert internal clock ticks to nanoseconds. | |
SRTIME | rt_timer_tsc2ns (SRTIME ticks) |
Convert local CPU clock ticks to nanoseconds. | |
int | rt_timer_inquire (RT_TIMER_INFO *info) |
Inquire about the timer. | |
RTIME | rt_timer_read (void) |
Return the current system time. | |
RTIME | rt_timer_tsc (void) |
Return the current TSC value. | |
void | rt_timer_spin (RTIME ns) |
Busy wait burning CPU cycles. | |
int | rt_timer_set_mode (RTIME nstick) |
Set the system clock rate. |
|
Inquire about the timer. Return various information about the status of the system timer.
Environments: This service can be called from:
Rescheduling: never. |
|
Convert nanoseconds to internal clock ticks. Convert a count of nanoseconds to internal clock ticks. This routine operates on signed nanosecond values.
This service can be called from:
Rescheduling: never. |
|
Convert nanoseconds to local CPU clock ticks. Convert a count of nanoseconds to local CPU clock ticks. This routine operates on signed nanosecond values.
This service can be called from:
Rescheduling: never. |
|
Return the current system time. Return the current time maintained by the system timer.
This service can be called from:
Rescheduling: never.
|
|
Set the system clock rate. This routine switches to periodic timing mode and sets the clock tick rate, or resets the current timing mode to aperiodic/oneshot mode depending on the value of the nstick parameter. Since the Xenomai nucleus automatically starts the system timer according to the configured policy and period when a real-time skin is loaded (see CONFIG_XENO_OPT_TIMING_PERIOD), calling rt_timer_set_mode() is not required from applications unless the pre-defined mode and period need to be changed dynamically. This service also sets the time unit which will be relevant when specifying time intervals to the services taking timeout or delays as input parameters. In periodic mode, clock ticks will represent periodic jiffies. In oneshot mode, clock ticks will represent nanoseconds.
Environments: This service can be called from:
Rescheduling: never. |
|
Busy wait burning CPU cycles. Enter a busy waiting loop for a count of nanoseconds. The precision of this service largely depends on the availability of a time stamp counter on the current CPU. Since this service is usually called with interrupts enabled, the caller might be preempted by other real-time activities, therefore the actual delay might be longer than specified.
This service can be called from:
Rescheduling: never. |
|
Convert internal clock ticks to nanoseconds. Convert a count of internal clock ticks to nanoseconds. This routine operates on signed tick values.
This service can be called from:
Rescheduling: never. |
|
Return the current TSC value. Return the value of the time stamp counter (TSC) maintained by the CPU of the underlying architecture.
This service can be called from:
Rescheduling: never. |
|
Convert local CPU clock ticks to nanoseconds. Convert a local CPU clock ticks to nanoseconds. This routine operates on signed tick values.
This service can be called from:
Rescheduling: never. |