40 if (editRate !=
nullptr)
60 return ((nowNs != 0ULL) && (targetNs >= nowNs)) ? targetNs - nowNs : 0ULL;
int sleepUntil(Timepoint timepoint, Clock clock=Clock::Realtime) noexcept
Duration sleep(Duration duration, Clock clock=Clock::Realtime) noexcept
constexpr Timepoint indexToTimestamp(mxlRational const &editRate, std::uint64_t index) noexcept
constexpr std::uint64_t timestampToIndex(mxlRational const &editRate, Timepoint timestamp) noexcept
#define MXL_UNDEFINED_INDEX
struct mxlRational_t mxlRational
MXL_EXPORT uint64_t mxlIndexToTimestamp(mxlRational const *editRate, uint64_t index)
MXL_EXPORT void mxlSleepForNs(uint64_t ns)
MXL_EXPORT uint64_t mxlTimestampToIndex(mxlRational const *editRate, uint64_t timestamp)
MXL_EXPORT uint64_t mxlGetNsUntilIndex(uint64_t index, mxlRational const *editRate)
MXL_EXPORT uint64_t mxlGetCurrentIndex(mxlRational const *editRate)
MXL_EXPORT uint64_t mxlGetTime()
MXL_EXPORT void mxlSleepUntil(uint64_t timestamp)