7constexpr uint64_t kNanosecondsPerSecond = 1'000'000'000;
8constexpr uint64_t kNanosecondsPerMinute = 60 * kNanosecondsPerSecond;
9constexpr uint64_t kNanosecondsPerHour = 60 * kNanosecondsPerMinute;
10constexpr uint32_t kSecondsPerMinute = 60;
11constexpr uint32_t kSecondsPerHour = 60 * kSecondsPerMinute;
27 [[nodiscard]]
virtual uint64_t
GetTimeNs()
const = 0;
37 [[nodiscard]]
virtual int16_t
GetDstMin()
const = 0;
62 uint64_t utc_timestamp_;
82 uint64_t local_timestamp_;
84 int16_t timezone_offset_min_ = 0;
85 int16_t dst_offset_min_ = 0;
100 int16_t dst_offset_min);
107 uint64_t utc_timestamp_;
108 int16_t timezone_offset_min_;
109 int16_t dst_offset_min_;
Interface for timestamp handling in MDF files.
Definition itimestamp.h:17
virtual int16_t GetDstMin() const =0
Get the daylight saving time offset in minutes.
virtual uint64_t GetTimeNs() const =0
Get the time in nanoseconds.
virtual ~ITimestamp()=default
Virtual destructor for ITimestamp.
virtual int16_t GetTimezoneMin() const =0
Get the timezone offset in minutes.
virtual uint64_t GetUtcTimeNs() const =0
Get the UTC time in nanoseconds.
Class representing a local timestamp, with timezone and DST offset.
Definition itimestamp.h:68
int16_t GetDstMin() const override
Get the daylight saving time offset in minutes.
uint64_t GetTimeNs() const override
Get the time in nanoseconds.
int16_t GetTimezoneMin() const override
Get the timezone offset in minutes.
LocalTimestamp(uint64_t local_timestamp)
Constructor for LocalTimeStamp.
uint64_t GetUtcTimeNs() const override
Get the UTC time in nanoseconds.
Class representing a timestamp with timezone information.
Definition itimestamp.h:91
int16_t GetDstMin() const override
Get the daylight saving time offset in minutes.
TimezoneTimestamp(uint64_t utc_timestamp, int16_t timezone_offset_min, int16_t dst_offset_min)
Constructor for TimezoneTimeStamp.
int16_t GetTimezoneMin() const override
Get the timezone offset in minutes.
uint64_t GetUtcTimeNs() const override
Get the UTC time in nanoseconds.
uint64_t GetTimeNs() const override
Get the time in nanoseconds.
Class representing a UTC timestamp.
Definition itimestamp.h:48
uint64_t GetUtcTimeNs() const override
Get the UTC time in nanoseconds.
UtcTimestamp(uint64_t utc_timestamp)
Constructor for UtcTimeStamp.
uint64_t GetTimeNs() const override
Get the time in nanoseconds.
int16_t GetTimezoneMin() const override
Get the timezone offset in minutes.
int16_t GetDstMin() const override
Get the daylight saving time offset in minutes.
Main namespace for the MDF library.
Definition canmessage.h:17