moved to here from vxWorksMT
This commit is contained in:
35
src/libCom/osi/os/vxWorks/osdTime.cpp
Normal file
35
src/libCom/osi/os/vxWorks/osdTime.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <tickLib.h>
|
||||
#include <sysLib.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "osiTime.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);
|
||||
}
|
||||
Reference in New Issue
Block a user