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

Comparing libev/ev.pod (file contents):
Revision 1.191 by root, Tue Sep 30 19:45:23 2008 UTC vs.
Revision 1.192 by root, Tue Sep 30 19:51:44 2008 UTC

2502=over 4 2502=over 4
2503 2503
2504=item ev_once (loop, int fd, int events, ev_tstamp timeout, callback) 2504=item ev_once (loop, int fd, int events, ev_tstamp timeout, callback)
2505 2505
2506This function combines a simple timer and an I/O watcher, calls your 2506This function combines a simple timer and an I/O watcher, calls your
2507callback on whichever event happens first and automatically stop both 2507callback on whichever event happens first and automatically stops both
2508watchers. This is useful if you want to wait for a single event on an fd 2508watchers. This is useful if you want to wait for a single event on an fd
2509or timeout without having to allocate/configure/start/stop/free one or 2509or timeout without having to allocate/configure/start/stop/free one or
2510more watchers yourself. 2510more watchers yourself.
2511 2511
2512If C<fd> is less than 0, then no I/O watcher will be started and events 2512If C<fd> is less than 0, then no I/O watcher will be started and the
2513is being ignored. Otherwise, an C<ev_io> watcher for the given C<fd> and 2513C<events> argument is being ignored. Otherwise, an C<ev_io> watcher for
2514C<events> set will be created and started. 2514the given C<fd> and C<events> set will be created and started.
2515 2515
2516If C<timeout> is less than 0, then no timeout watcher will be 2516If C<timeout> is less than 0, then no timeout watcher will be
2517started. Otherwise an C<ev_timer> watcher with after = C<timeout> (and 2517started. Otherwise an C<ev_timer> watcher with after = C<timeout> (and
2518repeat = 0) will be started. While C<0> is a valid timeout, it is of 2518repeat = 0) will be started. While C<0> is a valid timeout, it is of
2519dubious value. 2519dubious value.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines