… | |
… | |
178 | you actually want to know. Also interesting is the combination of |
178 | you actually want to know. Also interesting is the combination of |
179 | C<ev_update_now> and C<ev_now>. |
179 | C<ev_update_now> and C<ev_now>. |
180 | |
180 | |
181 | =item ev_sleep (ev_tstamp interval) |
181 | =item ev_sleep (ev_tstamp interval) |
182 | |
182 | |
183 | Sleep for the given interval: The current thread will be blocked until |
183 | Sleep for the given interval: The current thread will be blocked |
184 | either it is interrupted or the given time interval has passed. Basically |
184 | until either it is interrupted or the given time interval has |
|
|
185 | passed (approximately - it might return a bit earlier even if not |
|
|
186 | interrupted). Returns immediately if C<< interval <= 0 >>. |
|
|
187 | |
185 | this is a sub-second-resolution C<sleep ()>. |
188 | Basically this is a sub-second-resolution C<sleep ()>. |
|
|
189 | |
|
|
190 | The range of the C<interval> is limited - libev only guarantees to work |
|
|
191 | with sleep times of up to one day (C<< interval <= 86400 >>). |
186 | |
192 | |
187 | =item int ev_version_major () |
193 | =item int ev_version_major () |
188 | |
194 | |
189 | =item int ev_version_minor () |
195 | =item int ev_version_minor () |
190 | |
196 | |
… | |
… | |
946 | overhead for the actual polling but can deliver many events at once. |
952 | overhead for the actual polling but can deliver many events at once. |
947 | |
953 | |
948 | By setting a higher I<io collect interval> you allow libev to spend more |
954 | By setting a higher I<io collect interval> you allow libev to spend more |
949 | time collecting I/O events, so you can handle more events per iteration, |
955 | time collecting I/O events, so you can handle more events per iteration, |
950 | at the cost of increasing latency. Timeouts (both C<ev_periodic> and |
956 | at the cost of increasing latency. Timeouts (both C<ev_periodic> and |
951 | C<ev_timer>) will be not affected. Setting this to a non-null value will |
957 | C<ev_timer>) will not be affected. Setting this to a non-null value will |
952 | introduce an additional C<ev_sleep ()> call into most loop iterations. The |
958 | introduce an additional C<ev_sleep ()> call into most loop iterations. The |
953 | sleep time ensures that libev will not poll for I/O events more often then |
959 | sleep time ensures that libev will not poll for I/O events more often then |
954 | once per this interval, on average. |
960 | once per this interval, on average (as long as the host time resolution is |
|
|
961 | good enough). |
955 | |
962 | |
956 | Likewise, by setting a higher I<timeout collect interval> you allow libev |
963 | Likewise, by setting a higher I<timeout collect interval> you allow libev |
957 | to spend more time collecting timeouts, at the expense of increased |
964 | to spend more time collecting timeouts, at the expense of increased |
958 | latency/jitter/inexactness (the watcher callback will be called |
965 | latency/jitter/inexactness (the watcher callback will be called |
959 | later). C<ev_io> watchers will not be affected. Setting this to a non-null |
966 | later). C<ev_io> watchers will not be affected. Setting this to a non-null |