From 504c51f354e9ca1001d4ddfe4d9aa0222715385c Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Sun, 21 Sep 2025 07:18:19 +0100 Subject: [PATCH] Fix STM32 benchmark endless loop after 1 hour If the STM32 has an RTC, this is used to time the execution of each benchmark item. It was only multiplying hours by 24 to get seconds, so after one hour the amount of seconds went to less than 3600. Therefore the benchmark thought negative time elapsed and would never end. --- IDE/STM32Cube/wolfssl_example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDE/STM32Cube/wolfssl_example.c b/IDE/STM32Cube/wolfssl_example.c index d2fed0a526d..9c89ddf9246 100644 --- a/IDE/STM32Cube/wolfssl_example.c +++ b/IDE/STM32Cube/wolfssl_example.c @@ -1830,7 +1830,7 @@ double current_time(void) (void) date; /* return seconds.milliseconds */ - return ((double) time.Hours * 24) + ((double) time.Minutes * 60) + return ((double) time.Hours * 3600) + ((double) time.Minutes * 60) + (double) time.Seconds + ((double) subsec / 1000); } #endif /* HAL_RTC_MODULE_ENABLED */