diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index c2d1543a9..81cf6713c 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -1,7 +1,6 @@ // // Example EPICS CA server // - #include "exServer.h" #include "gddApps.h" @@ -68,11 +67,6 @@ void exPV::destroy() caStatus exPV::update(gdd &valueIn) { caServer *pCAS = this->getCAS(); - // - // gettimeofday() is very slow under sunos4 - // - osiTime cur (this->currentTime); - struct timespec t; caStatus cas; # if DEBUG @@ -85,9 +79,8 @@ caStatus exPV::update(gdd &valueIn) return cas; } - t.tv_sec = (time_t) cur.getSecTruncToLong (); - t.tv_nsec = cur.getNSecTruncToLong (); - this->pValue->setTimeStamp(&t); + aitTimeStamp ts (this->currentTime); + this->pValue->setTimeStamp (&ts); this->pValue->setStat (epicsAlarmNone); this->pValue->setSevr (epicsSevNone); @@ -277,16 +270,15 @@ caStatus exPV::getSeverity(gdd &value) // inline aitTimeStamp exPV::getTS() { - aitTimeStamp ts; if (this->pValue!=NULL) { + aitTimeStamp ts; this->pValue->getTimeStamp(&ts); + return ts; } else { - osiTime cur(osiTime::getCurrentEPICS()); - ts.tv_sec = (time_t) cur.getSecTruncToLong (); - ts.tv_nsec = cur.getNSecTruncToLong (); + return osiTime::getCurrent(); } - return ts; + } // diff --git a/src/cas/example/simple/exScalarPV.cc b/src/cas/example/simple/exScalarPV.cc index d4ec70ec5..c33f0569a 100644 --- a/src/cas/example/simple/exScalarPV.cc +++ b/src/cas/example/simple/exScalarPV.cc @@ -40,7 +40,7 @@ void exScalarPV::scan() // throughput under sunos4 because gettimeofday() is // slow) // - this->currentTime = osiTime::getCurrentEPICS(); + this->currentTime = osiTime::getCurrent(); pDD = new gddScalar (gddAppType_value, aitEnumFloat32); if (pDD==NULL) { diff --git a/src/cas/example/simple/exVectorPV.cc b/src/cas/example/simple/exVectorPV.cc index 6b497f88e..b50bb6f4a 100644 --- a/src/cas/example/simple/exVectorPV.cc +++ b/src/cas/example/simple/exVectorPV.cc @@ -63,7 +63,7 @@ void exVectorPV::scan() // throughput under sunos4 because gettimeofday() is // slow) // - this->currentTime = osiTime::getCurrentEPICS(); + this->currentTime = osiTime::getCurrent(); pDD = new gddAtomic (gddAppType_value, aitEnumFloat32, 1u, this->info.getElementCount());