-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwshow.c,v 6.30 2002-10-27 09:11:14 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwshow.c,v 6.31 2002-10-27 12:26:33 hadaq Exp $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
{
int i;
int nRequests = 0;
+ int nPoll = 0;
+ const int nPollMax = 60 / my->nShips;
for (i = 0; i < my->nShips; i++) {
if (HwShip_isEmpty(my->ship[i])) {
}
}
}
-#if 0
+#if 1
/*
* This sleep prevents a tight loop which stops work on real
* time systems if the priority of readout is not lowered.
* When not using the sleep use option -p -2 for daq_readout.
*/
- if (nRequests == my->nShips) {
+ if (nRequests == my->nShips && nPoll++ >= nPollMax) {
struct timespec tS, *t = &tS;
t->tv_sec = 0;
t->tv_nsec = 020000000;