changeset 33929:ef9b6445fc55

Ensure we do not use 100% CPU when waiting for input with no file-based inputs.
author reimar
date Sat, 27 Aug 2011 09:58:54 +0000
parents 27b1c4df84bd
children db545d85bb11
files input/input.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Fri Aug 26 19:35:46 2011 +0000
+++ b/input/input.c	Sat Aug 27 09:58:54 2011 +0000
@@ -1269,7 +1269,8 @@
 			    strerror(errno));
 		FD_ZERO(&fds);
 	    }
-	}
+	} else if (time)
+	    usec_sleep(time * 1000);
     }
 #else
     if (!got_cmd && time)