[CLI] Function "print time" added
This commit is contained in:
@@ -235,6 +235,11 @@ int cliDisplay(const char ** argv)
|
|||||||
serialPrint("outputs[%d] = %04X", i, channelOutputs[i]);
|
serialPrint("outputs[%d] = %04X", i, channelOutputs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[1], "time")) {
|
||||||
|
struct gtm utm;
|
||||||
|
gettime(&utm);
|
||||||
|
serialPrint("time = %4d-%02d-%02d %02d:%02d:%02d.%02d0,", utm.tm_year+1900, utm.tm_mon+1, utm.tm_mday, utm.tm_hour, utm.tm_min, utm.tm_sec, g_ms100);
|
||||||
|
}
|
||||||
else if (toInt(argv, 1, &address) > 0) {
|
else if (toInt(argv, 1, &address) > 0) {
|
||||||
int size = 256;
|
int size = 256;
|
||||||
if (toInt(argv, 2, &size) >= 0) {
|
if (toInt(argv, 2, &size) >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user