… | |
… | |
291 | When libev detects a usage error such as a negative timer interval, then |
291 | When libev detects a usage error such as a negative timer interval, then |
292 | it will print a diagnostic message and abort (via the \f(CW\*(C`assert\*(C'\fR mechanism, |
292 | it will print a diagnostic message and abort (via the \f(CW\*(C`assert\*(C'\fR mechanism, |
293 | so \f(CW\*(C`NDEBUG\*(C'\fR will disable this checking): these are programming errors in |
293 | so \f(CW\*(C`NDEBUG\*(C'\fR will disable this checking): these are programming errors in |
294 | the libev caller and need to be fixed there. |
294 | the libev caller and need to be fixed there. |
295 | .PP |
295 | .PP |
|
|
296 | Via the \f(CW\*(C`EV_FREQUENT\*(C'\fR macro you can compile in and/or enable extensive |
|
|
297 | consistency checking code inside libev that can be used to check for |
|
|
298 | internal inconsistencies, suually caused by application bugs. |
|
|
299 | .PP |
296 | Libev also has a few internal error-checking \f(CW\*(C`assert\*(C'\fRions, and also has |
300 | Libev also has a few internal error-checking \f(CW\*(C`assert\*(C'\fRions. These do not |
297 | extensive consistency checking code. These do not trigger under normal |
|
|
298 | circumstances, as they indicate either a bug in libev or worse. |
301 | trigger under normal circumstances, as they indicate either a bug in libev |
|
|
302 | or worse. |
299 | .SH "GLOBAL FUNCTIONS" |
303 | .SH "GLOBAL FUNCTIONS" |
300 | .IX Header "GLOBAL FUNCTIONS" |
304 | .IX Header "GLOBAL FUNCTIONS" |
301 | These functions can be called anytime, even before initialising the |
305 | These functions can be called anytime, even before initialising the |
302 | library in any way. |
306 | library in any way. |
303 | .IP "ev_tstamp ev_time ()" 4 |
307 | .IP "ev_tstamp ev_time ()" 4 |
… | |
… | |
5082 | called. If set to \f(CW2\fR, then the internal verification code will be |
5086 | called. If set to \f(CW2\fR, then the internal verification code will be |
5083 | called once per loop, which can slow down libev. If set to \f(CW3\fR, then the |
5087 | called once per loop, which can slow down libev. If set to \f(CW3\fR, then the |
5084 | verification code will be called very frequently, which will slow down |
5088 | verification code will be called very frequently, which will slow down |
5085 | libev considerably. |
5089 | libev considerably. |
5086 | .Sp |
5090 | .Sp |
|
|
5091 | Verification errors are reported via C's \f(CW\*(C`assert\*(C'\fR mechanism, so if you |
|
|
5092 | disable that (e.g. by defining \f(CW\*(C`NDEBUG\*(C'\fR) then no errors will be reported. |
|
|
5093 | .Sp |
5087 | The default is \f(CW1\fR, unless \f(CW\*(C`EV_FEATURES\*(C'\fR overrides it, in which case it |
5094 | The default is \f(CW1\fR, unless \f(CW\*(C`EV_FEATURES\*(C'\fR overrides it, in which case it |
5088 | will be \f(CW0\fR. |
5095 | will be \f(CW0\fR. |
5089 | .IP "\s-1EV_COMMON\s0" 4 |
5096 | .IP "\s-1EV_COMMON\s0" 4 |
5090 | .IX Item "EV_COMMON" |
5097 | .IX Item "EV_COMMON" |
5091 | By default, all watchers have a \f(CW\*(C`void *data\*(C'\fR member. By redefining |
5098 | By default, all watchers have a \f(CW\*(C`void *data\*(C'\fR member. By redefining |