Table 1: Accuracy of the nanosleep() system call.
Sleep Time | Scheduler | Average | Min | Max |
1 s | SCHED_NORMAL | 0.001999 | 0.001934 | 0.002064 |
1 s | SCHED_FIFO | 0.001999 | 0.001933 | 0.002066 |
1 ms | SCHED_NORMAL | 0.003000 | 0.002401 | 0.018595 |
1 ms | SCHED_FIFO | 0.002999 | 0.002935 | 0.003061 |
5 ms | SCHED_NORMAL | 0.006997 | 0.006665 | 0.013211 |
5 ms | SCHED_FIFO | 0.006998 | 0.006712 | 0.007282 |
48 ms | SCHED_NORMAL | 0.049989 | 0.049568 | 0.052229 |
48 ms | SCHED_FIFO | 0.049991 | 0.049981 | 0.050002 |
1 s | SCHED_NORMAL | 1.001847 | 1.001249 | 1.015976 |
1 s | SCHED_FIFO | 1.001838 | 1.001842 | 1.001849 |