getclock(TIMEOFDAY, &ts);
# endif
now->l_i = ts.tv_sec + JAN_1970;
+ now->l_uf |= ntp_random() & 0x3;
dtemp = sys_residual + ts.tv_nsec / 1e9;
if (dtemp >= 1.) {
dtemp -= 1.;
now->l_i--;
}
now->l_uf = (u_int32)(dtemp * FRAC);
- now->l_uf |= ntp_random() & 0x3;
#else /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
struct timeval tv; /* seconds and microseconds */
*/
GETTIMEOFDAY(&tv, NULL);
now->l_i = tv.tv_sec + JAN_1970;
+ now->l_uf |= ntp_random() & 0xfff;
dtemp = sys_residual + tv.tv_usec / 1e6;
if (dtemp >= 1.) {
dtemp -= 1.;
now->l_i--;
}
now->l_uf = (u_int32)(dtemp * FRAC);
- now->l_uf |= ntp_random() & 0xfff;
#endif /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
}
{
#ifdef DEBUG
if (debug)
- printf("local_clock: at %lu offset %.6f freq %.3f state %d step %d\n",
+ printf("local_clock: at %lu offset %.9f freq %.6f state %d step %d\n",
update, offset, drift_comp * 1e6, trans,
clock_stepcnt);
#endif
p_del = t21 - t34;
#ifdef DEBUG
if (debug > 1)
- printf("proto: t21 %.6lf %d t34 %.6lf %d\n", peer->t21,
+ printf("proto: t21 %.9lf %d t34 %.9lf %d\n", peer->t21,
peer->t21_bytes, peer->t34, peer->t34_bytes);
#endif
sys_kod--;
xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
PKT_VERSION(rpkt->li_vn_mode), xmode);
- xpkt.stratum = STRATUM_UNSPEC;
+ xpkt.stratum = STRATUM_PKT_UNSPEC;
memcpy(&xpkt.refid, "RATE", 4);
xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
xpkt.rootdispersion =