+ cli_print(cli, "%-30s%u", "call_random_data", GET_STAT(call_random_data));
+#endif /* STAT_CALLS */
+
+ {
+ time_t l = GET_STAT(last_reset);
+ char *t = ctime(&l);
+ char *p = strchr(t, '\n');
+ if (p) *p = 0;
+
+ cli_print(cli, "");
+ cli_print(cli, "Last counter reset %s", t);
+ }
+
+ return CLI_OK;
+}
+
+static int cmd_clear_counters(struct cli_def *cli, char *command, char **argv, int argc)
+{
+ if (CLI_HELP_REQUESTED)
+ return CLI_HELP_NO_ARGS;
+
+ memset(_statistics, 0, sizeof(struct Tstats));
+ SET_STAT(last_reset, time(NULL));
+
+ cli_print(cli, "Counters cleared");