From 5295856396dc8364bf5ba3c710fb5210c095198a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 5 Nov 2017 22:12:10 +0100 Subject: add json from abs_time_nbo --- src/json/json_generator.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/json/json_generator.c') diff --git a/src/json/json_generator.c b/src/json/json_generator.c index e660e10c5..98f7163bc 100644 --- a/src/json/json_generator.c +++ b/src/json/json_generator.c @@ -72,6 +72,19 @@ GNUNET_JSON_from_time_abs (struct GNUNET_TIME_Absolute stamp) } +/** + * Convert absolute timestamp to a json string. + * + * @param stamp the time stamp + * @return a json string with the timestamp in @a stamp + */ +json_t * +GNUNET_JSON_from_time_abs_nbo (struct GNUNET_TIME_AbsoluteNBO stamp) +{ + return GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (stamp)); +} + + /** * Convert relative timestamp to a json string. * -- cgit v1.2.3