renamed files

This commit is contained in:
Jeff Hill
2000-01-28 02:24:14 +00:00
parent d184d47a67
commit d16b7ddfb9
23 changed files with 1703 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
//
// should move the gettimeofday() proto
// into a different header
//
#include "osiSock.h"
#define epicsExportSharedSymbols
#include "osiTime.h"
//
// osiTime::osdGetCurrent ()
//
extern "C" epicsShareFunc int epicsShareAPI tsStampGetCurrent (TS_STAMP *pDest)
{
# if defined(CLOCK_REALTIME)
struct timespec ts;
int status;
status = clock_gettime (CLOCK_REALTIME, &ts);
if (status) {
return tsStampERROR;
}
*pDest = osiTime (ts);
return tsStampERROR;
# else
int status;
struct timeval tv;
status = gettimeofday (&tv, NULL);
if (status) {
return tsStampERROR;
}
*pDest = osiTime (tv);
return tsStampERROR;
# endif
}
//
// tsStampGetEvent ()
//
extern "C" epicsShareFunc int epicsShareAPI tsStampGetEvent (TS_STAMP *pDest, unsigned eventNumber)
{
if (eventNumber==tsStampEventCurrentTime) {
return tsStampGetCurrent (pDest);
}
else {
return tsStampERROR;
}
}