rtl_setclockmode

Name

rtl_setclockmode -- set the RTLinux clock mode

Synopsis

       #include <rtl_sched.h>

       int rtl_setclockmode(clockid_t clock, int mode, hrtime_t mode_param);

DESCRIPTION

This function is a non-portable Realtime Linux extension.

rtl_setclockmode sets the mode of the specified clock. The allowed modes depend on the clock. Generally, the following modes are supported:

RTL_CLOCK_MODE_ONESHOT

The clock is in the oneshot mode. The mode_param is ignored.

RTL_CLOCK_MODE_PERIODIC

The clock is in the periodic mode. The mode_param is the period expressed in nanoseconds.

RETURN VALUE

This function returns 0 on success and a negative error code on error.

ERRORS

-EINVAL

The mode or the parameter is invalid.

AUTHOR

Michael Barabanov (baraban@fsmlabs.com)

SEE ALSO

UNIX spec clock_gettime(3), rtl_getschedclock(3), clock_gethrtime(3)

2001 FSMLabs Inc.

All rights reserved.