diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-01 18:03:28 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-01 18:03:28 +0100 |
commit | 4eea7f267335e91cd85749b6c273511a0a0788d6 (patch) | |
tree | 87abef617874eba47a7bd691312b6a17f8101e9e /src | |
parent | 052270b2cbba325076cd5ff57b04c2df5eec2307 (diff) |
a
Diffstat (limited to 'src')
-rw-r--r-- | src/object.cpp | 2 | ||||
-rw-r--r-- | src/timer-ns.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/object.cpp b/src/object.cpp index be455b9b..041a6d48 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -281,7 +281,7 @@ uint32_t object::allocate_frame_time(Ns dt, uint16_t& accum, uint32_t hz, float //const auto count = Ns::Type{ns_in_sec / hz} + accum}; const auto from_accum = uint64_t{accum} * ns_in_sec / u16_max; const auto from_dt = Ns(uint64_t(ld(dt.stamp) * ld(speed))); - fm_assert(from_dt <= Ns{1 << 54}); + fm_assert(from_dt <= Ns{uint64_t{1} << 54}); const auto ticks = from_dt + from_accum; const auto frame_duration = ns_in_sec / hz; const auto frames = (uint32_t)(ticks / frame_duration); diff --git a/src/timer-ns.cpp b/src/timer-ns.cpp index 80bd29df..2b4bfd09 100644 --- a/src/timer-ns.cpp +++ b/src/timer-ns.cpp @@ -29,7 +29,7 @@ Ns operator+(const Ns& lhs, const Ns& rhs) { constexpr auto max = (uint64_t)-1; auto a = lhs.stamp, b = rhs.stamp; - fm_assert(max - a <= b); + fm_assert(max - a >= b); return Ns{a + b}; } |