… | |
… | |
620 | happily wraps around with enough iterations. |
620 | happily wraps around with enough iterations. |
621 | |
621 | |
622 | This value can sometimes be useful as a generation counter of sorts (it |
622 | This value can sometimes be useful as a generation counter of sorts (it |
623 | "ticks" the number of loop iterations), as it roughly corresponds with |
623 | "ticks" the number of loop iterations), as it roughly corresponds with |
624 | C<ev_prepare> and C<ev_check> calls. |
624 | C<ev_prepare> and C<ev_check> calls. |
|
|
625 | |
|
|
626 | =item unsigned int ev_loop_depth (loop) |
|
|
627 | |
|
|
628 | Returns the number of times C<ev_loop> was entered minus the number of |
|
|
629 | times C<ev_loop> was exited, in other words, the recursion depth. |
|
|
630 | |
|
|
631 | Outside C<ev_loop>, this number is zero. In a callback, this number is |
|
|
632 | C<1>, unless C<ev_loop> was invoked recursively (or from another thread), |
|
|
633 | in which case it is higher. |
|
|
634 | |
|
|
635 | Leaving C<ev_loop> abnormally (setjmp/longjmp, cancelling the thread |
|
|
636 | etc.), doesn't count as exit. |
625 | |
637 | |
626 | =item unsigned int ev_backend (loop) |
638 | =item unsigned int ev_backend (loop) |
627 | |
639 | |
628 | Returns one of the C<EVBACKEND_*> flags indicating the event backend in |
640 | Returns one of the C<EVBACKEND_*> flags indicating the event backend in |
629 | use. |
641 | use. |
… | |
… | |
4077 | =item C<double> must hold a time value in seconds with enough accuracy |
4089 | =item C<double> must hold a time value in seconds with enough accuracy |
4078 | |
4090 | |
4079 | The type C<double> is used to represent timestamps. It is required to |
4091 | The type C<double> is used to represent timestamps. It is required to |
4080 | have at least 51 bits of mantissa (and 9 bits of exponent), which is good |
4092 | have at least 51 bits of mantissa (and 9 bits of exponent), which is good |
4081 | enough for at least into the year 4000. This requirement is fulfilled by |
4093 | enough for at least into the year 4000. This requirement is fulfilled by |
4082 | implementations implementing IEEE 754 (basically all existing ones). |
4094 | implementations implementing IEEE 754, which is basically all existing |
|
|
4095 | ones. With IEEE 754 doubles, you get microsecond accuracy until at least |
|
|
4096 | 2200. |
4083 | |
4097 | |
4084 | =back |
4098 | =back |
4085 | |
4099 | |
4086 | If you know of other additional requirements drop me a note. |
4100 | If you know of other additional requirements drop me a note. |
4087 | |
4101 | |