From 54456e0cb43988d4c7208b40b92c3aab3d87cd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Wed, 10 Jun 2020 17:43:05 +0200 Subject: [PATCH] application: minor, improve code --- application.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.c b/application.c index 7360f8e..a0cd100 100644 --- a/application.c +++ b/application.c @@ -430,7 +430,7 @@ static void command_version(void* argument) static void command_uptime(void* argument) { (void)argument; // we won't use the argument - uint32_t uptime = (rtc_get_counter_val() - time_start) / RTC_TICKS_SECOND; // get time from internal RTC + const uint32_t uptime = (rtc_get_counter_val() - time_start) / RTC_TICKS_SECOND; // get time from internal RTC printf("uptime: %u.%02u:%02u:%02u\n", uptime / (24 * 60 * 60), (uptime / (60 * 60)) % 24, (uptime / 60) % 60, uptime % 60); }