rtapi_delay_max(3rtapi)

rtapi_delay_max3rtapi

Busy-loop for short delays

Part of rtapi_delay(3rtapi).

Usage

void rtapi_delay(long int nsec)

void rtapi_delay_max()

Arguments

nsec

The desired delay length in nanoseconds

Overview

rtapi_delay is a simple delay. It is intended only for short delays, since it simply loops, wasting CPU cycles.

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

rtapi_delay_max should be called before using rtapi_delay 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.

Realtime considerations

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

Return value

rtapi_delay_max returns the maximum delay permitted.

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

From linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.