ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.157 by root, Tue May 20 23:49:41 2008 UTC vs.
Revision 1.159 by root, Thu May 22 02:44:57 2008 UTC

689interval to a value near C<0.1> or so, which is often enough for 689interval to a value near C<0.1> or so, which is often enough for
690interactive servers (of course not for games), likewise for timeouts. It 690interactive servers (of course not for games), likewise for timeouts. It
691usually doesn't make much sense to set it to a lower value than C<0.01>, 691usually doesn't make much sense to set it to a lower value than C<0.01>,
692as this approsaches the timing granularity of most systems. 692as this approsaches the timing granularity of most systems.
693 693
694=item ev_loop_verify (loop)
695
696This function only does something when C<EV_VERIFY> support has been
697compiled in. It tries to go through all internal structures and checks
698them for validity. If anything is found to be inconsistent, it will print
699an error message to standard error and call C<abort ()>.
700
701This can be used to catch bugs inside libev itself: under normal
702circumstances, this function will never abort as of course libev keeps its
703data structures consistent.
704
694=back 705=back
695 706
696 707
697=head1 ANATOMY OF A WATCHER 708=head1 ANATOMY OF A WATCHER
698 709
1332time where C<time = at (mod interval)>, regardless of any time jumps. 1343time where C<time = at (mod interval)>, regardless of any time jumps.
1333 1344
1334For numerical stability it is preferable that the C<at> value is near 1345For numerical stability it is preferable that the C<at> value is near
1335C<ev_now ()> (the current time), but there is no range requirement for 1346C<ev_now ()> (the current time), but there is no range requirement for
1336this value, and in fact is often specified as zero. 1347this value, and in fact is often specified as zero.
1348
1349Note also that there is an upper limit to how often a timer can fire (cpu
1350speed for example), so if C<interval> is very small then timing stability
1351will of course detoriate. Libev itself tries to be exact to be about one
1352millisecond (if the OS supports it and the machine is fast enough).
1337 1353
1338=item * manual reschedule mode (at and interval ignored, reschedule_cb = callback) 1354=item * manual reschedule mode (at and interval ignored, reschedule_cb = callback)
1339 1355
1340In this mode the values for C<interval> and C<at> are both being 1356In this mode the values for C<interval> and C<at> are both being
1341ignored. Instead, each time the periodic watcher gets scheduled, the 1357ignored. Instead, each time the periodic watcher gets scheduled, the
3026noticably with with many (hundreds) of watchers. 3042noticably with with many (hundreds) of watchers.
3027 3043
3028The default is C<1> unless C<EV_MINIMAL> is set in which case it is C<0> 3044The default is C<1> unless C<EV_MINIMAL> is set in which case it is C<0>
3029(disabled). 3045(disabled).
3030 3046
3047=item EV_VERIFY
3048
3049Controls how much internal verification (see C<ev_loop_verify ()>) will
3050be done: If set to C<0>, no internal verification code will be compiled
3051in. If set to C<1>, then verification code will be compiled in, but not
3052called. If set to C<2>, then the internal verification code will be
3053called once per loop, which can slow down libev. If set to C<3>, then the
3054verification code will be called very frequently, which will slow down
3055libev considerably.
3056
3057The default is C<1>, unless C<EV_MINIMAL> is set, in which case it will be
3058C<0.>
3059
3031=item EV_COMMON 3060=item EV_COMMON
3032 3061
3033By default, all watchers have a C<void *data> member. By redefining 3062By default, all watchers have a C<void *data> member. By redefining
3034this macro to a something else you can include more and other types of 3063this macro to a something else you can include more and other types of
3035members. You have to define it each time you include one of the files, 3064members. You have to define it each time you include one of the files,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines