Index: trunk/Ohana/src/opihi/pantasks/CheckSystem.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/CheckSystem.c	(revision 4714)
+++ trunk/Ohana/src/opihi/pantasks/CheckSystem.c	(revision 4762)
@@ -1,38 +1,36 @@
 # include "psched.h"
+
+# define MAX_DELAY 0.1
+struct timeval start;
+static int Ncheck = 0;
 
 int CheckSystem () {
 
-  /* need to make a timeout: if this process lasts too long, 
-     we should return so the user can get input in.  this cannot
-     just be a return, because we need to hit each of the elements
-     eventually
-  */
-  struct timeval start, stop;
-  double dtime;
-  
   gettimeofday (&start, (void *) NULL);
-  CheckTasks ();
+
+  if (Ncheck < 5) {
+    CheckTasks ();
+    CheckJobs ();
+    Ncheck ++;
+  } else {
+    CheckController ();
+    CheckControllerOutput ();
+    Ncheck = 0;
+  }
+  return (TRUE);
+}
+
+int TestElapsedCheck () {
+
+  struct timeval stop;
+  float dtime;
+
   gettimeofday (&stop, (void *) NULL);
   dtime = DTIME (stop, start);
-  if (VerboseMode()) fprintf (stderr, "check 1: %f seconds\n", dtime);
+  if (dtime > MAX_DELAY) return (TRUE);
+  return (FALSE);
+}
 
-  gettimeofday (&start, (void *) NULL);
-  CheckJobs ();
-  gettimeofday (&stop, (void *) NULL);
-  dtime = DTIME (stop, start);
-  if (VerboseMode()) fprintf (stderr, "check 2: %f seconds\n", dtime);
-
-  gettimeofday (&start, (void *) NULL);
-  CheckController ();
-  gettimeofday (&stop, (void *) NULL);
-  dtime = DTIME (stop, start);
-  if (VerboseMode()) fprintf (stderr, "check 3: %f seconds\n", dtime);
-
-  gettimeofday (&start, (void *) NULL);
-  CheckControllerOutput ();
-  gettimeofday (&stop, (void *) NULL);
-  dtime = DTIME (stop, start);
-  if (VerboseMode()) fprintf (stderr, "check 4: %f seconds\n", dtime);
-
-  return (TRUE);
-}
+  /* do we really need to check the controller on every call?
+     or perhaps alternate?
+  */
