From b404b30fb97904d555ead91c9c49dd898b403aed Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 3 Mar 2026 12:30:32 -0800 Subject: [PATCH] Fix integer overflow in THROTTLE first call Initializing m_last to time_point::min() causes signed integer overflow when computing now - m_last, since the nanosecond difference exceeds int64_t range. Initialize to now - interval instead so the first Ready() call passes naturally. --- include/core/throttle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/core/throttle.h b/include/core/throttle.h index 4b487117c0..c5c54e5da4 100644 --- a/include/core/throttle.h +++ b/include/core/throttle.h @@ -36,7 +36,7 @@ class THROTTLE public: explicit THROTTLE( std::chrono::milliseconds aInterval ) : m_interval( aInterval ), - m_last( std::chrono::steady_clock::time_point::min() ) + m_last( std::chrono::steady_clock::now() - aInterval ) { }