From f8cf4a582e2afde6ac242a16da8aa1bbf827369c Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 22 May 2001 01:37:09 +0000 Subject: [PATCH] made compatible with timer library API changes --- src/libCom/fdmgr/fdManager.cpp | 8 ++------ src/libCom/fdmgr/fdmgr.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/libCom/fdmgr/fdManager.cpp b/src/libCom/fdmgr/fdManager.cpp index 5a1bf92ec..0e3477800 100644 --- a/src/libCom/fdmgr/fdManager.cpp +++ b/src/libCom/fdmgr/fdManager.cpp @@ -154,11 +154,7 @@ epicsShareFunc void fdManager::process (double delay) // more than once here so that fd activity get serviced // in a reasonable length of time. // - minDelay = this->pTimerQueue->getNextExpireDelay (); - if ( minDelay <= 0.0 ) { - this->pTimerQueue->process(); - minDelay = this->pTimerQueue->getNextExpireDelay (); - } + minDelay = this->pTimerQueue->process(epicsTime::getCurrent()); if ( minDelay >= delay ) { minDelay = delay; @@ -192,7 +188,7 @@ epicsShareFunc void fdManager::process (double delay) &this->fdSets[fdrWrite], &this->fdSets[fdrException], &tv); } - this->pTimerQueue->process(); + this->pTimerQueue->process(epicsTime::getCurrent()); if (status==0) { this->processInProg = 0; return; diff --git a/src/libCom/fdmgr/fdmgr.cpp b/src/libCom/fdmgr/fdmgr.cpp index 670fe1ab9..7fabd1268 100644 --- a/src/libCom/fdmgr/fdmgr.cpp +++ b/src/libCom/fdmgr/fdmgr.cpp @@ -83,7 +83,7 @@ private: pCallBackFDMgr pFunc; void *pParam; unsigned id; - epicsShareFunc expireStatus expire (); + epicsShareFunc expireStatus expire ( const epicsTime & currentTime ); }; class oldFdmgr : public fdManager { @@ -122,14 +122,14 @@ epicsShareFunc void fdRegForOldFdmgr::callBack () timerForOldFdmgr::timerForOldFdmgr ( oldFdmgr &fdmgrIn, double delayIn, pCallBackFDMgr pFuncIn, void * pParamIn ) : - timer ( fdmgrIn.timerQueueRef().createTimer( *this ) ), + timer ( fdmgrIn.timerQueueRef().createTimer() ), fdmgr ( fdmgrIn ), pFunc ( pFuncIn ), pParam( pParamIn ) { if ( pFuncIn == NULL ) { throwWithLocation ( noFunctionSpecified () ); } this->fdmgr.resTbl.add (*this); - this->timer.start ( delayIn ); + this->timer.start ( *this, delayIn ); } timerForOldFdmgr::~timerForOldFdmgr () @@ -143,7 +143,7 @@ timerForOldFdmgr::~timerForOldFdmgr () delete & this->timer; } -epicsTimerNotify::expireStatus timerForOldFdmgr::expire () +epicsTimerNotify::expireStatus timerForOldFdmgr::expire ( const epicsTime & ) { (*this->pFunc) (this->pParam); return noRestart;