… | |
… | |
39 | argument of name C<loop> (which is always of type C<struct ev_loop *>) |
39 | argument of name C<loop> (which is always of type C<struct ev_loop *>) |
40 | will not have this argument. |
40 | will not have this argument. |
41 | |
41 | |
42 | =head1 TIME AND OTHER GLOBAL FUNCTIONS |
42 | =head1 TIME AND OTHER GLOBAL FUNCTIONS |
43 | |
43 | |
44 | Libev represents time as a single floating point number. This type is |
44 | Libev represents time as a single floating point number, representing the |
|
|
45 | (fractional) number of seconds since the (POSIX) epoch (somewhere near |
|
|
46 | the beginning of 1970, details are complicated, don't ask). This type is |
45 | called C<ev_tstamp>, which is what you should use too. It usually aliases |
47 | called C<ev_tstamp>, which is what you should use too. It usually aliases |
46 | to the double type in C. |
48 | to the double type in C. |
47 | |
49 | |
48 | =over 4 |
50 | =over 4 |
49 | |
51 | |
… | |
… | |
465 | state where you do not expect data to travel on the socket, you can stop |
467 | state where you do not expect data to travel on the socket, you can stop |
466 | the timer, and again will automatically restart it if need be. |
468 | the timer, and again will automatically restart it if need be. |
467 | |
469 | |
468 | =back |
470 | =back |
469 | |
471 | |
470 | =head2 ev_periodic |
472 | =head2 ev_periodic - to cron or not to cron it |
471 | |
473 | |
472 | Periodic watchers are also timers of a kind, but they are very versatile |
474 | Periodic watchers are also timers of a kind, but they are very versatile |
473 | (and unfortunately a bit complex). |
475 | (and unfortunately a bit complex). |
474 | |
476 | |
475 | Unlike ev_timer's, they are not based on real time (or relative time) |
477 | Unlike ev_timer's, they are not based on real time (or relative time) |