35 u64SlotSizeMicroseconds_{},
37 u32FramesPerMultiFrame_{}{}
41 std::uint64_t u32SlotsPerFrame,
42 std::uint64_t u32FramesPerMultiFrame)
44 u64SlotSizeMicroseconds_ = slotSizeMicroseconds.count();
45 u32SlotsPerFrame_ = u32SlotsPerFrame;
46 u32FramesPerMultiFrame_ = u32FramesPerMultiFrame;
54 u32FramesPerMultiFrame_ *
56 u64SlotSizeMicroseconds_}};
64 u64SlotSizeMicroseconds_}};
71 u64SlotSizeMicroseconds_}};
75 std::tuple<std::uint64_t,std::uint64_t,std::uint64_t>
78 std::uint64_t count = std::chrono::duration_cast<
Microseconds>(timePoint.time_since_epoch()).count();
80 std::uint64_t slotIndex{count / u64SlotSizeMicroseconds_};
82 std::uint64_t frameIndex{slotIndex / u32SlotsPerFrame_};
84 std::uint64_t multiFrameIndex{frameIndex / u32FramesPerMultiFrame_};
86 return std::make_tuple(slotIndex,frameIndex,multiFrameIndex);
90 std::tuple<std::uint32_t,std::uint32_t>
93 return std::make_tuple(u64SlotIndex % u32SlotsPerFrame_,
94 u64SlotIndex / u32SlotsPerFrame_ % u32FramesPerMultiFrame_);
TimePoint getMultiFrameTime(std::uint64_t u64MultiFrameIndex) const
std::tuple< std::uint32_t, std::uint32_t > getRelativeIndex(std::uint64_t u64SlotIndex) const
TimePoint getFrameTime(std::uint64_t u64FrameIndex) const
TimePoint getSlotTime(std::uint64_t u64SlotIndex) const
void reset(const EMANE::Microseconds &slotSizeMicroseconds, std::uint64_t u32SlotsPerFrame, std::uint64_t u32FramesPerMultiFrame)
std::chrono::microseconds Microseconds
std::tuple< std::uint64_t, std::uint64_t, std::uint64_t > getAbsoluteIndex(const EMANE::TimePoint &timePoint) const
Clock::time_point TimePoint