application: minor, improve code
This commit is contained in:
parent
571c83a522
commit
5c9faa7062
|
@ -413,7 +413,7 @@ static void command_version(void* argument)
|
||||||
static void command_uptime(void* argument)
|
static void command_uptime(void* argument)
|
||||||
{
|
{
|
||||||
(void)argument; // we won't use the 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);
|
printf("uptime: %u.%02u:%02u:%02u\n", uptime / (24 * 60 * 60), (uptime / (60 * 60)) % 24, (uptime / 60) % 60, uptime % 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue