summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-05 22:00:01 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 22:00:01 +0200
commit575c10027bc6b6bff2da5e7c485d88ef44c54c65 (patch)
tree5812f8a2e746da966f501211b37e98ce70151942 /src/include
parent54e63f01df85ee0470493c6d0de29576ce3371c4 (diff)
downloadexchange-575c10027bc6b6bff2da5e7c485d88ef44c54c65.tar.gz
exchange-575c10027bc6b6bff2da5e7c485d88ef44c54c65.tar.bz2
exchange-575c10027bc6b6bff2da5e7c485d88ef44c54c65.zip
also offer API for receiving rounded relative time via JSON
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_json_lib.h12
1 files changed, 12 insertions, 0 deletions
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
@@ -106,6 +106,18 @@ TALER_JSON_spec_absolute_time_nbo (const char *name,
/**
+ * 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.
*
* @param field name of the field