Files
pcas/src/libCom/os/vxWorks/osdTime.cc
1999-08-05 17:30:53 +00:00

38 lines
521 B
C++

#define epicsExportSharedSymbols
#include <osiTime.h>
#include <tickLib.h>
#include <sysLib.h>
//
// osiTime::synchronize()
//
void osiTime::synchronize()
{
}
//
// osiTime::osdGetCurrent ()
//
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);
}