aboutsummaryrefslogtreecommitdiff
path: root/clocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'clocks.c')
-rw-r--r--clocks.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/clocks.c b/clocks.c
index 684bf88..411fcb2 100644
--- a/clocks.c
+++ b/clocks.c
@@ -286,14 +286,30 @@ static int clock_print_info_cb(struct tree *t, void *data)
return 0;
}
+static int clock_print_header(void)
+{
+ char *buf;
+ int ret;
+
+ if (asprintf(&buf, "%-55s %-16s %-12s %-9s %-8s",
+ "Name", "Flags", "Rate", "Usecount", "Children") < 0)
+ return -1;
+
+ ret = display_header_footer(CLOCK, buf);
+
+ free(buf);
+
+ return ret;
+}
+
static int clock_print_info(void)
{
int ret, line = 0;
- print_clock_header();
-
display_reset_cursor(CLOCK);
+ clock_print_header();
+
ret = tree_for_each(clock_tree, clock_print_info_cb, &line);
display_refresh_pad(CLOCK);