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

Comparing libev/ev.pod (file contents):
Revision 1.16 by root, Mon Nov 12 08:47:14 2007 UTC vs.
Revision 1.17 by root, Mon Nov 12 08:57:03 2007 UTC

39F<README.embed> in the libev distribution. If libev was configured without 39F<README.embed> in the libev distribution. If libev was configured without
40support for multiple event loops, then all functions taking an initial 40support for multiple event loops, then all functions taking an initial
41argument of name C<loop> (which is always of type C<struct ev_loop *>) 41argument of name C<loop> (which is always of type C<struct ev_loop *>)
42will not have this argument. 42will not have this argument.
43 43
44=head1 TIME AND OTHER GLOBAL FUNCTIONS 44=head1 TIME REPRESENTATION
45 45
46Libev represents time as a single floating point number, representing the 46Libev represents time as a single floating point number, representing the
47(fractional) number of seconds since the (POSIX) epoch (somewhere near 47(fractional) number of seconds since the (POSIX) epoch (somewhere near
48the beginning of 1970, details are complicated, don't ask). This type is 48the beginning of 1970, details are complicated, don't ask). This type is
49called C<ev_tstamp>, which is what you should use too. It usually aliases 49called C<ev_tstamp>, which is what you should use too. It usually aliases
50to the double type in C. 50to the double type in C.
51
52=head1 GLOBAL FUNCTIONS
51 53
52=over 4 54=over 4
53 55
54=item ev_tstamp ev_time () 56=item ev_tstamp ev_time ()
55 57
99An event loop is described by a C<struct ev_loop *>. The library knows two 101An event loop is described by a C<struct ev_loop *>. The library knows two
100types of such loops, the I<default> loop, which supports signals and child 102types of such loops, the I<default> loop, which supports signals and child
101events, and dynamically created loops which do not. 103events, and dynamically created loops which do not.
102 104
103If you use threads, a common model is to run the default event loop 105If you use threads, a common model is to run the default event loop
104in your main thread (or in a separate thrad) and for each thread you 106in your main thread (or in a separate thread) and for each thread you
105create, you also create another event loop. Libev itself does no locking 107create, you also create another event loop. Libev itself does no locking
106whatsoever, so if you mix calls to the same event loop in different 108whatsoever, so if you mix calls to the same event loop in different
107threads, make sure you lock (this is usually a bad idea, though, even if 109threads, make sure you lock (this is usually a bad idea, though, even if
108done correctly, because it's hideous and inefficient). 110done correctly, because it's hideous and inefficient).
109 111

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines