--- libev/ev.pod 2007/11/12 08:57:03 1.17 +++ libev/ev.pod 2007/11/12 09:01:12 1.18 @@ -51,6 +51,9 @@ =head1 GLOBAL FUNCTIONS +These functions can be called anytime, even before initialising the +library in any way. + =over 4 =item ev_tstamp ev_time () @@ -562,12 +565,10 @@ reschedule callback will be called with the watcher as first, and the current time as second argument. -NOTE: I. If you need -to stop it, return C (or so, fudge fudge) and stop it afterwards. - -Also, I<< this callback must always return a time that is later than the -passed C value >>. Not even C itself will be ok. +NOTE: I. If you need to stop it, +return C (or so, fudge fudge) and stop it afterwards (e.g. by +starting a prepare watcher). Its prototype is C, e.g.: @@ -582,6 +583,9 @@ will usually be called just before the callback will be triggered, but might be called at other times, too. +NOTE: I<< This callback must always return a time that is later than the +passed C value >>. Not even C itself will do, it must be larger. + This can be used to create very complex timers, such as a timer that triggers on each midnight, local time. To do this, you would calculate the next midnight after C and return the timestamp value for this. How you do this