3#include <QtCore/QtGlobal>
4#include <QtCore/QtEndian>
5#include <QtCore/QDateTime>
30 quint32 s = ntpMSecs / 1000;
31 quint32 f = 0x100000000ll * (ntpMSecs % 1000) / 1000;
44 quint32 s = qFromBigEndian(
seconds);
45 quint32 f = qFromBigEndian(
fraction);
48 qint64 ntpMSecs = s * 1000ll + f * 1000ll / 0x100000000ll;
54 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:24
Time toTime() const
Definition NtpTimestamp.h:41
quint32 fraction
Definition NtpTimestamp.h:18
NtpTimestamp()
Definition NtpTimestamp.h:20