summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-14 14:47:35 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-14 18:52:56 -0700
commit7ca54553bb3e6a801982d6778b41ecd535b63d2a (patch)
tree3a9f98c91028a4532d7adeb06e01dea706711787 /src/testing
parentd11b162ac67268e77c39d633972bc3e05d3f7995 (diff)
downloadnng-7ca54553bb3e6a801982d6778b41ecd535b63d2a.tar.gz
nng-7ca54553bb3e6a801982d6778b41ecd535b63d2a.tar.bz2
nng-7ca54553bb3e6a801982d6778b41ecd535b63d2a.zip
Added realtime clock support, and better timestamping.
The realtime clock is not (yet) exposed for user applications, but it is used for logging timestamps accurately.
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/nuts.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/testing/nuts.h b/src/testing/nuts.h
index ce75fc66..6321b005 100644
--- a/src/testing/nuts.h
+++ b/src/testing/nuts.h
@@ -1,5 +1,5 @@
//
-// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -203,6 +203,12 @@ extern const char *nuts_client_crt;
#define NUTS_PROTO(x, y) (((x) << 4u) | (y))
+#define NUTS_ENABLE_LOG(level) \
+ do { \
+ nng_log_set_logger(nng_stderr_logger); \
+ nng_log_set_level(level); \
+ } while (0)
+
#ifdef __cplusplus
};
#endif