1,6 → 1,5 |
|
int cmd_uptime(char param[]) |
{ |
void get_str_uptime(char *str, const char *fmt) { |
unsigned time_tick, up_days, up_hours, up_minutes, up_seconds, up_millisecs; |
|
time_tick = kol_time_tick(); |
10,11 → 9,12 |
up_seconds = (time_tick/100)%60; |
up_millisecs = (time_tick*10)%100; |
|
#if LANG_ENG |
printf (" Uptime: %d day(s), %d:%d:%d.%d\n\r", up_days, up_hours, up_minutes, up_seconds, up_millisecs); |
#elif LANG_RUS |
printf (" Uptime: %d ¤¥©, %d:%d:%d.%d\n\r", up_days, up_hours, up_minutes, up_seconds, up_millisecs); |
#endif |
sprintf (str, fmt, up_days, up_hours, up_minutes, up_seconds, up_millisecs); |
} |
|
int cmd_uptime(char param[]) { |
get_str_uptime(tmpstr, CMD_UPTIME_FMT); |
printf(tmpstr); |
return TRUE; |
} |
|