From 1260001bb124e3b8e60d559e1736ed3432c8cc6e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 12 Nov 2007 08:57:03 +0000 Subject: *** empty log message *** --- ev.pod | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'ev.pod') diff --git a/ev.pod b/ev.pod index bbc0893..82febdd 100644 --- a/ev.pod +++ b/ev.pod @@ -51,6 +51,9 @@ to the double type in C. =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 @@ ignored. Instead, each time the periodic watcher gets scheduled, the 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 @@ It must return the next time to trigger, based on the passed time value 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 -- cgit v1.2.3