summaryrefslogtreecommitdiffstats
path: root/lib/zlog.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-01-16 13:20:50 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-02-28 13:25:47 +0100
commitdf45017f48a9f8802386d70828efb074b2e52a05 (patch)
tree9c71d10f2d5b820314087b5e6991179fa6fdf717 /lib/zlog.c
parentMerge pull request #10387 from mobash-rasool/pim-cli-top (diff)
downloadfrr-df45017f48a9f8802386d70828efb074b2e52a05.tar.xz
frr-df45017f48a9f8802386d70828efb074b2e52a05.zip
lib: add accessor for raw timestamp in zlog
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/zlog.c')
-rw-r--r--lib/zlog.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/zlog.c b/lib/zlog.c
index 1b0751559..85606d262 100644
--- a/lib/zlog.c
+++ b/lib/zlog.c
@@ -908,6 +908,11 @@ size_t zlog_msg_ts_3164(struct zlog_msg *msg, struct fbuf *out, uint32_t flags)
return bputs(out, msg->ts_3164_str);
}
+void zlog_msg_tsraw(struct zlog_msg *msg, struct timespec *ts)
+{
+ memcpy(ts, &msg->ts, sizeof(*ts));
+}
+
void zlog_set_prefix_ec(bool enable)
{
atomic_store_explicit(&zlog_ec, enable, memory_order_relaxed);