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

Comparing libev/ev.pod (file contents):
Revision 1.104 by root, Sun Dec 23 03:48:02 2007 UTC vs.
Revision 1.105 by root, Sun Dec 23 03:50:10 2007 UTC

4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 #include <ev.h> 7 #include <ev.h>
8 8
9=head1 EXAMPLE PROGRAM 9=head2 EXAMPLE PROGRAM
10 10
11 #include <ev.h> 11 #include <ev.h>
12 12
13 ev_io stdin_watcher; 13 ev_io stdin_watcher;
14 ev_timer timeout_watcher; 14 ev_timer timeout_watcher;
65You register interest in certain events by registering so-called I<event 65You register interest in certain events by registering so-called I<event
66watchers>, which are relatively small C structures you initialise with the 66watchers>, which are relatively small C structures you initialise with the
67details of the event, and then hand it over to libev by I<starting> the 67details of the event, and then hand it over to libev by I<starting> the
68watcher. 68watcher.
69 69
70=head1 FEATURES 70=head2 FEATURES
71 71
72Libev supports C<select>, C<poll>, the Linux-specific C<epoll>, the 72Libev supports C<select>, C<poll>, the Linux-specific C<epoll>, the
73BSD-specific C<kqueue> and the Solaris-specific event port mechanisms 73BSD-specific C<kqueue> and the Solaris-specific event port mechanisms
74for file descriptor events (C<ev_io>), the Linux C<inotify> interface 74for file descriptor events (C<ev_io>), the Linux C<inotify> interface
75(for C<ev_stat>), relative timers (C<ev_timer>), absolute timers 75(for C<ev_stat>), relative timers (C<ev_timer>), absolute timers
82 82
83It also is quite fast (see this 83It also is quite fast (see this
84L<benchmark|http://libev.schmorp.de/bench.html> comparing it to libevent 84L<benchmark|http://libev.schmorp.de/bench.html> comparing it to libevent
85for example). 85for example).
86 86
87=head1 CONVENTIONS 87=head2 CONVENTIONS
88 88
89Libev is very configurable. In this manual the default configuration will 89Libev is very configurable. In this manual the default configuration will
90be described, which supports multiple event loops. For more info about 90be described, which supports multiple event loops. For more info about
91various configuration options please have a look at B<EMBED> section in 91various configuration options please have a look at B<EMBED> section in
92this manual. If libev was configured without support for multiple event 92this manual. If libev was configured without support for multiple event
93loops, then all functions taking an initial argument of name C<loop> 93loops, then all functions taking an initial argument of name C<loop>
94(which is always of type C<struct ev_loop *>) will not have this argument. 94(which is always of type C<struct ev_loop *>) will not have this argument.
95 95
96=head1 TIME REPRESENTATION 96=head2 TIME REPRESENTATION
97 97
98Libev represents time as a single floating point number, representing the 98Libev represents time as a single floating point number, representing the
99(fractional) number of seconds since the (POSIX) epoch (somewhere near 99(fractional) number of seconds since the (POSIX) epoch (somewhere near
100the beginning of 1970, details are complicated, don't ask). This type is 100the beginning of 1970, details are complicated, don't ask). This type is
101called C<ev_tstamp>, which is what you should use too. It usually aliases 101called C<ev_tstamp>, which is what you should use too. It usually aliases

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines