int sched_rr_get_interval (
struct timespec *interval);
The sched_rr_get_interval function updates the timespec structure referenced by the interval argument to contain the current quantum for the process executing under the SCHED_RR policy. If a process, running under the round-robin scheduling policy, runs without blocking or yielding for more than this amount of time, it may be preempted by another runnable process (at the same priority).
If the PID argument is zero, the current execution time limit for the calling process is returned.
No special privileges are needed to use the sched_rr_get_interval function.
On a successful call, a value of 0 is returned. On an unsuccessful call, a value of -1 is returned and errno is set to indicate the error.
The sched_rr_get_interval fails under the following condition:
Functions: sched_getparam(3), sched_getscheduler(3), sched_setparam(3), sched_setscheduler(3) delim off