3#include <QtCore/QtGlobal>
4#include <QtCore/QtEndian>
5#include <QtCore/QDateTime>
31 quint32 s = ntpMSecs / 1000;
32 quint32 f = 0x100000000ll * (ntpMSecs % 1000) / 1000;
46 quint32 s = qFromBigEndian(
seconds);
47 quint32 f = qFromBigEndian(
fraction);
50 qint64 ntpMSecs = s * 1000ll + f * 1000ll / 0x100000000ll;
56 static_assert(
sizeof(NtpTimestamp) == 8);
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
static constexpr uint08 MILLISECOND
Definition Time.h:83
uint08 getMilliseconds() const
Gets the timestamp in milliseconds.
Definition Time.h:193
Definition NtpTimestamp.h:13
quint32 seconds
Definition NtpTimestamp.h:15
NtpTimestamp(const Time &dateTime)
Definition NtpTimestamp.h:25
Time toTime() const
Definition NtpTimestamp.h:43
quint32 fraction
Definition NtpTimestamp.h:18
NtpTimestamp()
Definition NtpTimestamp.h:24