improve timing issue detections
[sahlberg/ctdb.git] / lib / tevent / tevent.c
index 2f6e591baad7b4f2a9466065e126430972f08b46..88ae01c40ae4bca5b3dba7ad280f2a649c27145f 100644 (file)
@@ -590,8 +590,6 @@ extern pid_t ctdbd_pid;
 int tevent_common_loop_wait(struct tevent_context *ev,
                            const char *location)
 {
-       static time_t t=0;
-       time_t new_t;
 
        /*
         * loop as long as we have events pending
@@ -608,19 +606,6 @@ int tevent_common_loop_wait(struct tevent_context *ev,
                                     ret, strerror(errno));
                        return ret;
                }
-               if (getpid() == ctdbd_pid) {
-                       new_t=time(NULL);
-                       if (t != 0) {
-                               if (t > new_t) {
-                                       tevent_debug(ev, TEVENT_DEBUG_FATAL, __location__ " ERROR Time skipped backward by %d seconds\n", (int)(t-new_t));
-                               }
-                               /* We assume here that we get at least one event every 3 seconds */
-                               if (new_t > (t+3)) {
-                                       tevent_debug(ev, TEVENT_DEBUG_FATAL, __location__ " ERROR Time jumped forward by %d seconds\n", (int)(new_t-t));
-                               }
-                       }
-                       t=new_t;
-               }
        }
 
        tevent_debug(ev, TEVENT_DEBUG_WARNING,