18 #include "epicsMath.h" 24 # pragma warning ( push ) 25 # pragma warning ( disable:4660 ) 29 # pragma warning ( pop ) 34 epicsTimer::~epicsTimer () {}
36 epicsTimerQueueNotify::~epicsTimerQueueNotify () {}
38 epicsTimerNotify::~epicsTimerNotify () {}
40 void epicsTimerNotify::show (
unsigned )
const {}
43 timer ( queue ), pCallBack ( pCBIn ), pPrivate ( pPrivateIn )
55 queueTmp.timerForCFreeList.
release (
this );
60 ( *this->pCallBack ) ( this->
pPrivate );
66 bool okToShare,
unsigned priority ) :
86 pRescheduleCallback ( pRescheduleCallbackIn ),
87 pSleepQuantumCallback ( pSleepQuantumCallbackIn ),
88 pPrivate ( pPrivateIn )
96 void epicsTimerQueuePassiveForC::reschedule ()
98 (*this->pRescheduleCallback) ( this->pPrivate );
101 double epicsTimerQueuePassiveForC::quantum ()
103 return (*this->pSleepQuantumCallback) ( this->pPrivate );
111 LIBCOM_API epicsTimerNotify::expireStatus::expireStatus ( restart_t restart ) :
114 if ( restart != noRestart ) {
115 throw std::logic_error
116 (
"timer restart was requested without specifying a delay?" );
120 LIBCOM_API epicsTimerNotify::expireStatus::expireStatus
121 ( restart_t restartIn,
const double & expireDelaySec ) :
122 delay ( expireDelaySec )
124 if ( restartIn != epicsTimerNotify::restart ) {
125 throw std::logic_error
126 (
"no timer restart was requested, but a delay was specified?" );
128 if ( this->delay < 0.0 || !
finite(this->delay) ) {
129 throw std::logic_error
130 (
"timer restart was requested, but a negative delay was specified?" );
134 LIBCOM_API
bool epicsTimerNotify::expireStatus::restart ()
const 136 return this->delay >= 0.0 &&
finite(this->delay);
139 LIBCOM_API
double epicsTimerNotify::expireStatus::expirationDelay ()
const 141 if ( this->delay < 0.0 || !
finite(this->delay) ) {
142 throw std::logic_error
143 (
"no timer restart was requested, but you are asking for a restart delay?" );
156 pRescheduleCallbackIn,
157 pSleepQuantumCallbackIn,
165 extern "C" void epicsStdCall
171 extern "C" double epicsStdCall
175 return pQueue->
process ( epicsTime::getCurrent() );
202 pQueue->
show ( level );
212 ref->allocate ( ref, okToShare ?
true :
false, threadPriority );
239 pQueue->
show ( level );
251 pTmr->
start ( *pTmr, *pTime );
257 pTmr->
start ( *pTmr, delaySeconds );
267 return pTmr->getExpireDelay ();
273 pTmr->timer::show ( level );
double epicsStdCall epicsTimerGetExpireDelay(epicsTimerId pTmr)
epicsTimerId epicsStdCall epicsTimerQueueCreateTimer(epicsTimerQueueId pQueue, epicsTimerCallback pCallback, void *pArg)
LIBCOM_API void epicsStdCall epicsTimerQueuePassiveDestroyTimer(epicsTimerQueuePassiveId, epicsTimerId pTmr)
expireStatus expire(const epicsTime ¤tTime)
epicsTimerQueuePassiveId epicsStdCall epicsTimerQueuePassiveCreate(epicsTimerQueueNotifyReschedule pRescheduleCallbackIn, epicsTimerQueueNotifyQuantum pSleepQuantumCallbackIn, void *pPrivateIn)
epicsTimerId epicsStdCall epicsTimerQueuePassiveCreateTimer(epicsTimerQueuePassiveId pQueue, epicsTimerCallback pCallback, void *pArg)
void epicsStdCall epicsTimerCancel(epicsTimerId pTmr)
void show(unsigned int level) const
epicsTimerQueueId epicsStdCall epicsTimerQueueAllocate(int okToShare, unsigned int threadPriority)
void epicsStdCall epicsTimerQueueRelease(epicsTimerQueueId pQueue)
void(* epicsTimerCallback)(void *pPrivate)
epicsTimerQueuePassiveForC(epicsTimerQueueNotifyReschedule, epicsTimerQueueNotifyQuantum, void *pPrivate)
void epicsStdCall epicsTimerStartTime(epicsTimerId pTmr, const epicsTimeStamp *pTime)
double(* epicsTimerQueueNotifyQuantum)(void *pPrivate)
virtual ~epicsTimerQueueActiveForC()
epicsTimerQueueActiveForC(RefMgr &, bool okToShare, unsigned priority)
~epicsTimerQueuePassiveForC()
void show(unsigned int level) const
epicsSingleton< timerQueueActiveMgr >::reference RefMgr
double epicsStdCall epicsTimerQueuePassiveProcess(epicsTimerQueuePassiveId pQueue)
epicsTimerForC & createTimerForC(epicsTimerCallback pCallback, void *pArg)
void epicsStdCall epicsTimerQueuePassiveShow(epicsTimerQueuePassiveId pQueue, unsigned int level)
void epicsStdCall epicsTimerQueuePassiveDestroy(epicsTimerQueuePassiveId pQueue)
void epicsStdCall epicsTimerShow(epicsTimerId pTmr, unsigned int level)
EPICS time stamp, for use from C code.
double process(const epicsTime ¤tTime)
epicsSingleton< timerQueueActiveMgr > timerQueueMgrEPICS
void epicsStdCall epicsTimerQueueDestroyTimer(epicsTimerQueueId, epicsTimerId pTmr)
void epicsStdCall epicsTimerStartDelay(epicsTimerId pTmr, double delaySeconds)
epicsPlacementDeleteOperator((void *, tsFreeList< epicsTimerForC, 0x20 > &)) private void pPrivate)
epicsTimerForC(timerQueue &, epicsTimerCallback, void *pPrivateIn)
epicsTimerForC & createTimerForC(epicsTimerCallback pCallback, void *pArg)
void epicsStdCall epicsTimerQueueShow(epicsTimerQueueId pQueue, unsigned int level)
void start(class epicsTimerNotify &, const epicsTime &)
void(* epicsTimerQueueNotifyReschedule)(void *pPrivate)