o created tsStamp.h
o include tsStamp.h into tsDefs.h o use assert() instead of C++ exceptions on certain os
This commit is contained in:
@@ -3,24 +3,31 @@
|
||||
#define epicsExportSharedSymbols
|
||||
#include "osiTime.h"
|
||||
|
||||
//
|
||||
// osiTime::synchronize()
|
||||
//
|
||||
void osiTime::synchronize()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// osiTime::osdGetCurrent ()
|
||||
//
|
||||
osiTime osiTime::osdGetCurrent ()
|
||||
extern "C" epicsShareFunc int tsStampGetCurrent (TS_STAMP *pDest)
|
||||
{
|
||||
struct timespec ts;
|
||||
int status;
|
||||
struct timespec ts;
|
||||
|
||||
status = clock_gettime(CLOCK_REALTIME, &ts);
|
||||
if (status!=0) {
|
||||
throw unableToFetchCurrentTime ();
|
||||
status = clock_gettime (CLOCK_REALTIME, &ts);
|
||||
if (status) {
|
||||
return -1;
|
||||
}
|
||||
*pDest = osiTime (ts);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
// tsStampGetEvent ()
|
||||
//
|
||||
extern "C" epicsShareFunc int epicsShareAPI tsStampGetEvent (TS_STAMP *pDest, unsigned eventNumber)
|
||||
{
|
||||
if (eventNumber==tsStampEventCurrentTime) {
|
||||
return tsStampGetCurrent (pDest);
|
||||
}
|
||||
else {
|
||||
return tsStampERROR;
|
||||
}
|
||||
return osiTime (ts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user