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:
Michael Davidsaver
2019-10-06 20:10:20 -07:00
26 changed files with 114 additions and 73 deletions

View File

@@ -144,12 +144,12 @@ void dbPutNotifyBlocker::initiatePutNotify (
break;
}
if ( beginTimeInit ) {
if ( epicsTime::getCurrent () - begin > 30.0 ) {
if ( epicsTime::getMonotonic () - begin > 30.0 ) {
throw cacChannel::requestTimedOut ();
}
}
else {
begin = epicsTime::getCurrent ();
begin = epicsTime::getMonotonic ();
beginTimeInit = true;
}
{

View File

@@ -787,7 +787,7 @@ static void periodicTask(void *arg)
taskwdInsert(0, NULL, NULL);
epicsEventSignal(startStopEvent);
epicsTimeGetCurrent(&next);
epicsTimeGetMonotonic(&next);
reported = next;
while (ppsl->scanCtl != ctlExit) {
@@ -798,7 +798,7 @@ static void periodicTask(void *arg)
scanList(&ppsl->scan_list);
epicsTimeAddSeconds(&next, ppsl->period);
epicsTimeGetCurrent(&now);
epicsTimeGetMonotonic(&now);
delay = epicsTimeDiffInSeconds(&next, &now);
if (delay <= 0.0) {
if (overtime == 0.0) {