Commit 780e4de2 authored by Jean-Claude BAU's avatar Jean-Claude BAU

SNMP: Use PPSi time arithmetic library

parent 8580fc11
......@@ -53,6 +53,7 @@ SOURCES = \
wrsPortStatusTable.c \
wrsPtpInstanceTable.c \
init.c \
../ppsi/lib/time-arith.c
MIBS = WR-SWITCH-MIB.txt
......
......@@ -33,14 +33,6 @@ static struct pickinfo wrsPtpDataTable_pickinfo[] = {
};
//FIXME: make a library in ppsi with all such functions, use it all around
int64_t pp_time_to_picos(struct pp_time *ts)
{
return ts->secs * PP_NSEC_PER_SEC
+ ((ts->scaled_nsecs * 1000 + 0x8000) >> TIME_INTERVAL_FRACBITS);
}
static int32_t int_saturate(int64_t value)
{
if (value >= INT32_MAX)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment