changes so that TSinit can successfully call iocClockRegister

This commit is contained in:
Marty Kraimer
2001-03-07 21:40:22 +00:00
parent 64de91f99f
commit e8718d8265
2 changed files with 11 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ int iocClockGetCurrent(epicsTimeStamp *pDest)
epicsMutexUnlock(piocClockPvt->lock);
return(0);
}
int iocClockGetEvent(epicsTimeStamp *pDest, unsigned eventNumber)
{
if (eventNumber==epicsTimeEventCurrentTime) {
@@ -173,12 +173,22 @@ int iocClockGetEvent(epicsTimeStamp *pDest, unsigned eventNumber)
int epicsTimeGetCurrent (epicsTimeStamp *pDest)
{
if(!piocClockPvt) {
iocClockInit();
/*wait two seconds for syncNTP to contact network time server*/
epicsThreadSleep(2.0);
}
if(piocClockPvt->getCurrent) return((*piocClockPvt->getCurrent)(pDest));
return(epicsTimeERROR);
}
int epicsTimeGetEvent (epicsTimeStamp *pDest, unsigned eventNumber)
{
if(!piocClockPvt) {
iocClockInit();
/*wait two seconds for syncNTP to contact network time server*/
epicsThreadSleep(2.0);
}
if(piocClockPvt->getEvent)
return((*piocClockPvt->getEvent)(pDest,eventNumber));
return(epicsTimeERROR);

View File

@@ -84,7 +84,6 @@ static void epicsThreadInit(void)
assert(epicsThreadOnceMutex);
}
lock = 0;
iocClockInit();
}
unsigned int epicsThreadGetStackSize (epicsThreadStackSizeClass stackSizeClass)