--- libev/ev.pod 2010/03/16 00:54:52 1.288 +++ libev/ev.pod 2010/03/16 17:11:49 1.289 @@ -1034,7 +1034,7 @@ The file descriptor in the C watcher has become readable and/or writable. -=item C +=item C The C watcher has timed out. @@ -1766,7 +1766,7 @@ ev_init (timer, callback); last_activity = ev_now (loop); - callback (loop, timer, EV_TIMEOUT); + callback (loop, timer, EV_TIMER); And when there is some activity, simply store the current time in C, no libev calls at all: @@ -3181,9 +3181,9 @@ started. Otherwise an C watcher with after = C (and repeat = 0) will be started. C<0> is a valid timeout. -The callback has the type C and gets +The callback has the type C and is passed an C set like normal event callbacks (a combination of -C, C, C or C) and the C +C, C, C or C) and the C value passed to C. Note that it is possible to receive I a timeout and an io event at the same time - you probably should give io events precedence. @@ -3194,7 +3194,7 @@ { if (revents & EV_READ) /* stdin might have data for us, joy! */; - else if (revents & EV_TIMEOUT) + else if (revents & EV_TIMER) /* doh, nothing entered */; } @@ -4623,6 +4623,30 @@ =back +=head1 PORTING FROM 3.X TO 4.X + +The major version 4 introduced some minor incompatible changes to the API. + +=over 4 + +=item C replaced by C in C + +This is a simple rename - all other watcher types use their name +as revents flag, and now C does, too. + +Both C and C symbols were present in 3.x versions +and continue to be present for the forseeable future, so this is mostly a +documentation change. + +=item C mechanism replaced by C + +The preprocessor symbol C has been replaced by a different +mechanism, C. Programs using C usually compile +and work, but the library code will of course be larger. + +=back + + =head1 GLOSSARY =over 4 @@ -4653,7 +4677,7 @@ any other events happening anymore. In libev, events are represented as single bits (such as C or -C). +C). =item event library