summaryrefslogtreecommitdiff
path: root/src/include/merchant.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/merchant.h')
-rw-r--r--src/include/merchant.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/merchant.h b/src/include/merchant.h
index c66131ed..a5273507 100644
--- a/src/include/merchant.h
+++ b/src/include/merchant.h
@@ -27,6 +27,19 @@
#include <gnunet/gnunet_crypto_lib.h>
/**
+ * Macro to round microseconds to seconds in GNUNET_TIME_* structs.
+ */
+#define ROUND_TO_SECS(name,us_field) name.us_field -= name.us_field % (1000 * 1000)
+
+/**
+ * Shorthand for exit jumps.
+ */
+#define EXITIF(cond) \
+ do { \
+ if (cond) { GNUNET_break (0); goto EXITIF_exit; } \
+ } while (0)
+
+/**
* A mint
*/
struct MERCHANT_MintInfo {