diff --git a/src/libCom/timer/timerPrivate.h b/src/libCom/timer/timerPrivate.h index 228085d65..9701cf02a 100644 --- a/src/libCom/timer/timerPrivate.h +++ b/src/libCom/timer/timerPrivate.h @@ -107,7 +107,8 @@ private: epicsTime exceptMsgTimeStamp; bool cancelPending; static const double exceptMsgMinPeriod; - void printExceptMsg ( const char * pName, + static const double maxDelay; + void printExceptMsg ( const char * pName, const type_info & type ); timerQueue ( const timerQueue & ); timerQueue & operator = ( const timerQueue & ); diff --git a/src/libCom/timer/timerQueue.cpp b/src/libCom/timer/timerQueue.cpp index 5a798d4d4..915c6153f 100644 --- a/src/libCom/timer/timerQueue.cpp +++ b/src/libCom/timer/timerQueue.cpp @@ -21,6 +21,7 @@ #include "errlog.h" const double timerQueue :: exceptMsgMinPeriod = 60.0 * 5.0; // seconds +const double timerQueue :: maxDelay = 60 * 60 * 24 * 365242.5; // ~1000 years epicsTimerQueue::~epicsTimerQueue () {} @@ -57,7 +58,7 @@ void timerQueue :: } } catch ( ... ) { - delay = DBL_MAX; + delay = maxDelay; strcpy ( date, "UKN DATE" ); } if ( delay >= exceptMsgMinPeriod ) { @@ -91,7 +92,7 @@ double timerQueue::process ( const epicsTime & currentTime ) return delay; } else { - return DBL_MAX; + return maxDelay; } } @@ -116,14 +117,14 @@ double timerQueue::process ( const epicsTime & currentTime ) } } else { - return DBL_MAX; + return maxDelay; } # ifdef DEBUG unsigned N = 0u; # endif - double delay = DBL_MAX; + double delay = maxDelay; while ( true ) { epicsTimerNotify *pTmpNotify = this->pExpireTmr->pNotify; this->pExpireTmr->pNotify = 0; @@ -194,7 +195,7 @@ double timerQueue::process ( const epicsTime & currentTime ) } else { this->processThread = 0; - delay = DBL_MAX; + delay = maxDelay; break; } }