… | |
… | |
165 | |
165 | |
166 | =item ev_tstamp ev_time () |
166 | =item ev_tstamp ev_time () |
167 | |
167 | |
168 | Returns the current time as libev would use it. Please note that the |
168 | Returns the current time as libev would use it. Please note that the |
169 | C<ev_now> function is usually faster and also often returns the timestamp |
169 | C<ev_now> function is usually faster and also often returns the timestamp |
170 | you actually want to know. Also interetsing is the combination of |
170 | you actually want to know. Also interesting is the combination of |
171 | C<ev_update_now> and C<ev_now>. |
171 | C<ev_update_now> and C<ev_now>. |
172 | |
172 | |
173 | =item ev_sleep (ev_tstamp interval) |
173 | =item ev_sleep (ev_tstamp interval) |
174 | |
174 | |
175 | Sleep for the given interval: The current thread will be blocked until |
175 | Sleep for the given interval: The current thread will be blocked until |
… | |
… | |
193 | as this indicates an incompatible change. Minor versions are usually |
193 | as this indicates an incompatible change. Minor versions are usually |
194 | compatible to older versions, so a larger minor version alone is usually |
194 | compatible to older versions, so a larger minor version alone is usually |
195 | not a problem. |
195 | not a problem. |
196 | |
196 | |
197 | Example: Make sure we haven't accidentally been linked against the wrong |
197 | Example: Make sure we haven't accidentally been linked against the wrong |
198 | version (note, however, that this will not detect ABI mismatches :). |
198 | version (note, however, that this will not detect other ABI mismatches, |
|
|
199 | such as LFS or reentrancy). |
199 | |
200 | |
200 | assert (("libev version mismatch", |
201 | assert (("libev version mismatch", |
201 | ev_version_major () == EV_VERSION_MAJOR |
202 | ev_version_major () == EV_VERSION_MAJOR |
202 | && ev_version_minor () >= EV_VERSION_MINOR)); |
203 | && ev_version_minor () >= EV_VERSION_MINOR)); |
203 | |
204 | |
… | |
… | |
225 | probe for if you specify no backends explicitly. |
226 | probe for if you specify no backends explicitly. |
226 | |
227 | |
227 | =item unsigned int ev_embeddable_backends () |
228 | =item unsigned int ev_embeddable_backends () |
228 | |
229 | |
229 | Returns the set of backends that are embeddable in other event loops. This |
230 | Returns the set of backends that are embeddable in other event loops. This |
230 | is the theoretical, all-platform, value. To find which backends |
231 | value is platform-specific but can include backends not available on the |
231 | might be supported on the current system, you would need to look at |
232 | current system. To find which embeddable backends might be supported on |
232 | C<ev_embeddable_backends () & ev_supported_backends ()>, likewise for |
233 | the current system, you would need to look at C<ev_embeddable_backends () |
233 | recommended ones. |
234 | & ev_supported_backends ()>, likewise for recommended ones. |
234 | |
235 | |
235 | See the description of C<ev_embed> watchers for more info. |
236 | See the description of C<ev_embed> watchers for more info. |
236 | |
237 | |
237 | =item ev_set_allocator (void *(*cb)(void *ptr, long size)) [NOT REENTRANT] |
238 | =item ev_set_allocator (void *(*cb)(void *ptr, long size)) [NOT REENTRANT] |
238 | |
239 | |