NtpUtils { public static long calculateLastSrTimestamp(long ntp1, long ntp2) { byte[] high = uIntLongToByteWord(ntp1); byte[] low = uIntLongToByteWord(ntp2); low[3] = low[1]; low[2] = low[0]; low[1] = high[3]; low[0] = high[2]; return bytesToUIntLong(low, 0); }  static long calculateLastSrTimestamp(long ntp1, long ntp2);  }
@Test public void testSrTimestamp() { String ntpSec = "b44db705"; String ntpFrac = "20000000"; TimeStamp ntp = new TimeStamp(ntpSec.concat(".").concat(ntpFrac)); long srTs = NtpUtils.calculateLastSrTimestamp(ntp.getSeconds(), ntp.getFraction()); long srMs = (srTs * 1000) >> 16; Assert.assertEquals(46853125, srMs); }