From 575c10027bc6b6bff2da5e7c485d88ef44c54c65 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 5 Jul 2020 22:00:01 +0200 Subject: also offer API for receiving rounded relative time via JSON --- src/include/taler_json_lib.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index fbc8785d0..5a16d40a5 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -105,6 +105,18 @@ TALER_JSON_spec_absolute_time_nbo (const char *name, struct GNUNET_TIME_AbsoluteNBO *r_time); +/** + * Provide specification to parse given JSON object to a relative time. + * The absolute time value is expected to be already rounded. + * + * @param name name of the time field in the JSON + * @param[out] r_time where the time has to be written + */ +struct GNUNET_JSON_Specification +TALER_JSON_spec_relative_time (const char *name, + struct GNUNET_TIME_Relative *r_time); + + /** * Generate line in parser specification for denomination public key. * -- cgit v1.2.3