Simplify comments in secondsToMsClamped function

Removed detailed comments about seconds to milliseconds conversion.
This commit is contained in:
Ben Meadors
2026-04-28 10:43:24 -05:00
committed by GitHub
parent 96085b11bd
commit 1e32c94e81
+2 -6
View File
@@ -2,11 +2,7 @@
#include "meshUtils.h"
// Convert seconds to ms, clamping at INT32_MAX (~24.86 days). Callers store the
// result in uint32_t but the ultimate consumers (OSThread runOnce returns,
// `MAX_INTERVAL`, Apple-client interop per the FIXME at Default.h:14) treat it
// as int32_t. Saturating at INT32_MAX keeps every conversion well-defined and
// non-negative; no realistic interval (broadcast, throttle, sleep) needs more.
// Convert seconds to ms, clamping at INT32_MAX (~24.86 days)
static inline uint32_t secondsToMsClamped(uint32_t secs)
{
constexpr uint32_t MAX_MS = static_cast<uint32_t>(INT32_MAX);
@@ -80,4 +76,4 @@ uint8_t Default::getConfiguredOrDefaultHopLimit(uint8_t configured)
#else
return (configured >= HOP_MAX) ? HOP_MAX : config.lora.hop_limit;
#endif
}
}