Thread (9 messages) flat view 9 messages, 2 authors, 2021-03-17

Re: [PATCH iproute2-next v3 2/6] json_print: Add print_tv()

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-03-16 17:00:26

On Tue, 16 Mar 2021 11:20:12 +0100
Petr Machata [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Add a helper to dump a timeval. Print by first converting to double and
then dispatching to print_color_float().

Signed-off-by: Petr Machata <petrm@nvidia.com>
---
 include/json_print.h |  1 +
 lib/json_print.c     | 13 +++++++++++++
 2 files changed, 14 insertions(+)
diff --git a/include/json_print.h b/include/json_print.h
index 6fcf9fd910ec..63eee3823fe4 100644
--- a/include/json_print.h
+++ b/include/json_print.h
@@ -81,6 +81,7 @@ _PRINT_FUNC(0xhex, unsigned long long)
 _PRINT_FUNC(luint, unsigned long)
 _PRINT_FUNC(lluint, unsigned long long)
 _PRINT_FUNC(float, double)
+_PRINT_FUNC(tv, struct timeval *)
This 

Make it const please?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help