use posix RT

This commit is contained in:
Jeff Hill
1999-12-07 20:06:26 +00:00
parent 650aeed2d5
commit c9b7c7391d

View File

@@ -1,7 +1,4 @@
#include <vxWorks.h>
#include <tickLib.h>
#include <sysLib.h>
#define epicsExportSharedSymbols
#include "osiTime.h"
@@ -18,18 +15,12 @@ void osiTime::synchronize()
//
osiTime osiTime::osdGetCurrent ()
{
ULONG ticks;
ULONG sec;
ULONG nsec;
ULONG rate = sysClkRateGet();
//
// currently assuming that this has been already adjusted
// for the EPICS epoch
//
ticks = tickGet();
sec = ticks / rate;
nsec = (ticks % rate) * (nSecPerSec / rate);
return osiTime (sec, nsec);
struct timespec ts;
int status;
status = clock_gettime(CLOCK_REALTIME, &ts);
if (status!=0) {
throw unableToFetchCurrentTime ();
}
return osiTime (ts);
}