Skip to content

Commit

Permalink
forgot to pull
Browse files Browse the repository at this point in the history
  • Loading branch information
albinwwoxnerud committed May 11, 2024
2 parents d241966 + 2522699 commit 700ce79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/NTP_TDMG.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ typedef int8_t s_char; /* precision and poll interval (log2) */
/*
* Timestamp conversion macroni
*/
#define FRIC 65536. /* 2^16 as a double */
#define D2FP(r) ((tdist)((r) * FRIC)) /* NTP short */
#define FRIC 65536. /* 2^16 as a double */
#define D2FP(r) ((tdist)((r)*FRIC)) /* NTP short */
#define FP2D(r) ((double)(r) / FRIC)

#define FRAC 4294967296. /* 2^32 as a double */
#define D2LFP(a) ((tstamp)((a) * FRAC)) /* NTP timestamp */
#define FRAC 4294967296. /* 2^32 as a double */
#define D2LFP(a) ((tstamp)((a)*FRAC)) /* NTP timestamp */
#define LFP2D(a) ((double)(a) / FRAC)
#define U2LFP(a) (((unsigned long long)((a).tv_sec + JAN_1970) << 32) + (unsigned long long)((a).tv_usec / 1e6 * FRAC))

Expand Down
2 changes: 1 addition & 1 deletion testing/ntp-example-server/ntpserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type NTPPacket struct {
}

func corruptNTPPacket(packet *NTPPacket) {
packet.Stratum = 0 // Invalid stratum
packet.Stratum = 17 // Invalid stratum
}

func handleConnection(conn *net.UDPConn, fixedTime uint64, corrupt bool) {
Expand Down

0 comments on commit 700ce79

Please sign in to comment.