aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd/bfd_debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bfd/bfd_debug.h')
-rw-r--r--src/vnet/bfd/bfd_debug.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/bfd/bfd_debug.h b/src/vnet/bfd/bfd_debug.h
index 707ebab2..a06e934f 100644
--- a/src/vnet/bfd/bfd_debug.h
+++ b/src/vnet/bfd/bfd_debug.h
@@ -63,6 +63,13 @@
} \
while (0);
+#define BFD_CLK_FMT "%luus/%lu clocks/%.2fs"
+#define BFD_CLK_PRN(clocks) \
+ (u64) ((((f64)clocks) / vlib_get_main ()->clib_time.clocks_per_second) * \
+ USEC_PER_SECOND), \
+ (clocks), \
+ (((f64)clocks) / vlib_get_main ()->clib_time.clocks_per_second)
+
#else
#define BFD_DBG(...)
#define BFD_ERR(...)