commit 5c4015aee5aef01bda73645a3345d49e2fbf8adb
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sun Apr 26 18:15:51 2015 +0200

    remove caching of current time
    
    it's too hard to reliably predict when invalidation will be necessary.

 src/util.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/util.c b/src/util.c
index 8467338..570d426 100644
--- a/src/util.c
+++ b/src/util.c
@@ -688,17 +688,10 @@ wipe_notifier( notifier_t *sn )
 #endif
 }
 
-static int nowvalid;
-static time_t now;
-
 static time_t
 get_now( void )
 {
-       if (!nowvalid) {
-               nowvalid = 1;
-               return time( &now );
-       }
-       return now;
+       return time( 0 );
 }
 
 static list_head_t timers = { &timers, &timers };
@@ -764,7 +757,6 @@ event_wait( void )
 
 #ifdef HAVE_SYS_POLL_H
        int timeout = -1;
-       nowvalid = 0;
        if ((head = timers.next) != &timers) {
                wakeup_t *tmr = (wakeup_t *)head;
                time_t delta = tmr->timeout;
@@ -801,7 +793,6 @@ event_wait( void )
        fd_set rfds, wfds, efds;
        int fd;
 
-       nowvalid = 0;
        if ((head = timers.next) != &timers) {
                wakeup_t *tmr = (wakeup_t *)head;
                time_t delta = tmr->timeout;

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to