From 568b40a70bbf26b6c64a7201e275bc5e4e397d6f Mon Sep 17 00:00:00 2001 From: Aaro Altonen Date: Tue, 28 Jul 2020 10:35:21 +0300 Subject: [PATCH] Create TIME_DIFF macro --- include/util.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/util.hh b/include/util.hh index 7b2552f..65b4188 100644 --- a/include/util.hh +++ b/include/util.hh @@ -202,6 +202,8 @@ typedef struct rtp_ctx_conf { extern thread_local rtp_error_t rtp_errno; +#define TIME_DIFF(s, e, u) ((ssize_t)std::chrono::duration_cast(e - s).count()) + static inline void hex_dump(uint8_t *buf, size_t len) { if (!buf)