summaryrefslogtreecommitdiff
path: root/docs/man/man3/rtapi_delay.3rtapi
blob: b0028f18439fcc573c6b7225fcfac059d9a0d409 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.TH rtapi_delay "3rtapi" "2006-10-12" "LinuxCNC Documentation" "RTAPI"
.SH NAME

rtapi_delay \- Busy-loop for short delays

.SH SYNTAX
.HP
void rtapi_delay(long int \fInsec\fR)
.HP
void rtapi_delay_max()

.SH  ARGUMENTS
.IP \fInsec\fR
The desired delay length in nanoseconds

.SH DESCRIPTION
\fBrtapi_delay\fR is a simple delay.  It is intended only for short
delays, since it simply loops, wasting CPU cycles.

\fBrtapi_delay_max\fR returns the max delay permitted (usually
approximately 1/4 of the clock period).  Any call to \fBrtapi_delay\fR
requesting a delay longer than the max will delay for the max time only.

\fBrtapi_delay_max\fR should be called before using \fBrtapi_delay\fR to
make sure the required delays can be achieved.  The actual resolution
of the delay may be as good as one nano-second, or as bad as a several
microseconds.

.SH REALTIME CONSIDERATIONS
May be called from init/cleanup code, and from within realtime tasks.

.SH RETURN VALUE
\fBrtapi_delay_max\fB returns the maximum delay permitted.

.SH SEE ALSO
\fBrtapi_clock_set_period(3rtapi)\fR