[icinga-checkins] icinga.org: icinga-core/mfriedrich/fixes: permanently remove sleep on run_event == FALSE in main loop

git at icinga.org git at icinga.org
Sun Jan 31 20:53:07 CET 2010


Module: icinga-core
Branch: mfriedrich/fixes
Commit: fe54c31968c81188b0ac8c04a3a092fd18a0dd15
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=fe54c31968c81188b0ac8c04a3a092fd18a0dd15

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sun Jan 31 20:52:33 2010 +0100

permanently remove sleep on run_event == FALSE in main loop

fixes #168

---

 base/events.c |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/base/events.c b/base/events.c
index ed4af0a..9538a5f 100644
--- a/base/events.c
+++ b/base/events.c
@@ -1140,23 +1140,6 @@ int event_execution_loop(void){
 					my_free(temp_event);
 			        }
 
-			/* wait a while so we don't hog the CPU... */
-			else{
-
-				log_debug_info(DEBUGL_EVENTS,2,"Did not execute scheduled event.  Idling for a bit...\n");
-
-#ifdef USE_NANOSLEEP
-				delay.tv_sec=(time_t)sleep_time;
-				delay.tv_nsec=(long)((sleep_time-(double)delay.tv_sec)*1000000000);
-				nanosleep(&delay,NULL);
-#else
-				delay.tv_sec=(time_t)sleep_time;
-				if(delay.tv_sec==0L)
-					delay.tv_sec=1;
-				delay.tv_nsec=0L;
-				sleep((unsigned int)delay.tv_sec);
-#endif
-			        }
 		        }
 
 		/* we don't have anything to do at this moment in time... */





More information about the icinga-checkins mailing list