12 #include <epicsTypes.h> 13 #include <epicsTime.h> 17 #include <epicsMutex.h> 18 #include <epicsGuard.h> 19 #include <epicsTime.h> 20 #include <epicsVersion.h> 21 #include <initHooks.h> 23 #include <epicsExport.h> 30 #define S_time_unsynchronized epicsTimeERROR 40 static EVR* lastSrc = 0;
42 static epicsMutexId lastLock;
50 lastLock = epicsMutexMustCreate();
75 epicsMutexMustLock(lastLock);
79 epicsMutexUnlock(lastLock);
85 epicsMutexUnlock(lastLock);
87 }
catch (std::exception& e) {
88 epicsMutexUnlock(lastLock);
89 epicsPrintf(
"EVREventTime failed: %s\n", e.what());
102 #if EPICS_VERSION_INT >= VERSION_INT(3,14,9,0) 104 #include <generalTimeSup.h> 107 void EVRTime_Hooks(initHookState state)
109 if(state!=initHookAtBeginning)
120 epicsPrintf(
"EVR Current time provider NOT register\n");
124 epicsPrintf(
"Failed to register EVR time provider\n");
130 initHookRegister(&EVRTime_Hooks);
139 #include <epicsExport.h> int EVRCurrentTime(epicsTimeStamp *pDest)
epicsShareFunc int EVRInitTime()
epicsExportAddress(int, mrmGTIFEnable)
epicsExportRegistrar(EVRTime_Registrar)
static void visitObjects(bool(*)(Object *, void *), void *)
#define S_time_unsynchronized
#define ER_PROVIDER_PRIORITY
Priority given to EVR's timestamp/event provider.
int EVREventTime(epicsTimeStamp *pDest, int event)
priv(epicsTimeStamp *t, int e)
virtual bool getTimeStamp(epicsTimeStamp *ts, epicsUInt32 event)=0