Merge remote-tracking branch 'lp-Com/use-monotonic' into 7.0
* lp-Com/use-monotonic: VxWorks: Measure CPU time-base frequency if necessary replace most internal getCurrent() -> getMonotonic() dbScan periodic scan use monotonic time monotonic adapt to regular time APIs
This commit is contained in:
@@ -475,7 +475,7 @@ int ca_client_context::pendIO ( const double & timeout )
|
||||
}
|
||||
|
||||
int status = ECA_NORMAL;
|
||||
epicsTime beg_time = epicsTime::getCurrent ();
|
||||
epicsTime beg_time = epicsTime::getMonotonic ();
|
||||
double remaining = timeout;
|
||||
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
@@ -493,7 +493,7 @@ int ca_client_context::pendIO ( const double & timeout )
|
||||
this->blockForEventAndEnableCallbacks ( this->ioDone, remaining );
|
||||
}
|
||||
|
||||
double delay = epicsTime::getCurrent () - beg_time;
|
||||
double delay = epicsTime::getMonotonic () - beg_time;
|
||||
if ( delay < timeout ) {
|
||||
remaining = timeout - delay;
|
||||
}
|
||||
@@ -522,7 +522,7 @@ int ca_client_context::pendEvent ( const double & timeout )
|
||||
return ECA_EVDISALLOW;
|
||||
}
|
||||
|
||||
epicsTime current = epicsTime::getCurrent ();
|
||||
epicsTime current = epicsTime::getMonotonic ();
|
||||
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
@@ -563,7 +563,7 @@ int ca_client_context::pendEvent ( const double & timeout )
|
||||
this->noWakeupSincePend = true;
|
||||
}
|
||||
|
||||
double elapsed = epicsTime::getCurrent() - current;
|
||||
double elapsed = epicsTime::getMonotonic() - current;
|
||||
double delay;
|
||||
|
||||
if ( timeout > elapsed ) {
|
||||
|
||||
Reference in New Issue
Block a user