mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
Move NTP_int32 conversion functions to util.c
This commit is contained in:
18
ntp.h
18
ntp.h
@@ -93,22 +93,4 @@ typedef union {
|
||||
|
||||
#define NTP_NORMAL_PACKET_SIZE offsetof(NTP_Packet, auth_keyid)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
inline static double
|
||||
int32_to_double(NTP_int32 x)
|
||||
{
|
||||
return (double) ntohl(x) / 65536.0;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
inline static NTP_int32
|
||||
double_to_int32(double x)
|
||||
{
|
||||
return htonl((NTP_int32)(0.5 + 65536.0 * x));
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
#endif /* GOT_NTP_H */
|
||||
|
||||
Reference in New Issue
Block a user