… | |
… | |
3215 | |
3215 | |
3216 | If defined to be C<1>, libev will try to use a direct syscall instead |
3216 | If defined to be C<1>, libev will try to use a direct syscall instead |
3217 | of calling the system-provided C<clock_gettime> function. This option |
3217 | of calling the system-provided C<clock_gettime> function. This option |
3218 | exists because on GNU/Linux, C<clock_gettime> is in C<librt>, but C<librt> |
3218 | exists because on GNU/Linux, C<clock_gettime> is in C<librt>, but C<librt> |
3219 | unconditionally pulls in C<libpthread>, slowing down single-threaded |
3219 | unconditionally pulls in C<libpthread>, slowing down single-threaded |
3220 | programs needlessly. Using a direct syscall is slightly slower, because |
3220 | programs needlessly. Using a direct syscall is slightly slower (in |
3221 | no optimised vdso implementation can be used, but avoids the pthread |
3221 | theory), because no optimised vdso implementation can be used, but avoids |
3222 | dependency. Defaults to C<1> on GNU/Linux with glibc 2.x or higher. |
3222 | the pthread dependency. Defaults to C<1> on GNU/Linux with glibc 2.x or |
|
|
3223 | higher, as it simplifies linking (no need for C<-lrt>). |
3223 | |
3224 | |
3224 | =item EV_USE_NANOSLEEP |
3225 | =item EV_USE_NANOSLEEP |
3225 | |
3226 | |
3226 | If defined to be C<1>, libev will assume that C<nanosleep ()> is available |
3227 | If defined to be C<1>, libev will assume that C<nanosleep ()> is available |
3227 | and will use it for delays. Otherwise it will use C<select ()>. |
3228 | and will use it for delays. Otherwise it will use C<select ()>. |