+
+static clib_error_t *
+show_clock_command_fn (vlib_main_t * vm,
+ unformat_input_t * input, vlib_cli_command_t * cmd)
+{
+ int i;
+ int verbose = 0;
+
+ (void) unformat (input, "verbose %=", &verbose, 1);
+
+ vlib_cli_output (vm, "%U", format_clib_time, &vm->clib_time, verbose);
+
+ if (vec_len (vlib_mains) == 1)
+ return 0;
+
+ vlib_cli_output (vm, "Time last barrier release %.9f",
+ vm->time_last_barrier_release);
+
+ for (i = 1; i < vec_len (vlib_mains); i++)
+ {
+ if (vlib_mains[i] == 0)
+ continue;
+
+ vlib_cli_output (vm, "%d: %U", i, format_clib_time,
+ &vlib_mains[i]->clib_time, verbose);
+
+ vlib_cli_output (vm, "Thread %d offset %.9f error %.9f", i,
+ vlib_mains[i]->time_offset,
+ vm->time_last_barrier_release -
+ vlib_mains[i]->time_last_barrier_release);
+ }
+ return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (f_command, static) =
+{
+ .path = "show clock",
+ .short_help = "show clock",
+ .function = show_clock_command_fn,
+};
+/* *INDENT-ON* */
+