minor shell update: extend the tsch-status command

This commit is contained in:
Atis Elsts 2018-12-18 16:21:43 +00:00
parent f9cd3449f3
commit 08cbbe224b

View File

@ -584,8 +584,12 @@ PT_THREAD(cmd_tsch_status(struct pt *pt, shell_output_func output, char *args))
} else { } else {
SHELL_OUTPUT(output, "none\n"); SHELL_OUTPUT(output, "none\n");
} }
SHELL_OUTPUT(output, "-- Last synchronized: %lu seconds ago\n", (clock_time() - last_sync_time) / CLOCK_SECOND); SHELL_OUTPUT(output, "-- Last synchronized: %lu seconds ago\n",
SHELL_OUTPUT(output, "-- Drift w.r.t. coordinator: %ld ppm\n", tsch_adaptive_timesync_get_drift_ppm()); (clock_time() - tsch_last_sync_time) / CLOCK_SECOND);
SHELL_OUTPUT(output, "-- Drift w.r.t. coordinator: %ld ppm\n",
tsch_adaptive_timesync_get_drift_ppm());
SHELL_OUTPUT(output, "-- Network uptime: %lu seconds\n",
(unsigned long)(tsch_get_network_uptime_ticks() / CLOCK_SECOND));
} }
PT_END(pt); PT_END(pt);