aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-10-19 15:16:25 -0700
committerGarrett D'Amore <garrett@damore.org>2017-10-19 17:56:49 -0700
commit4e668fdd5b5da0d46f97d835249dbe5f0ea319a7 (patch)
tree0aaad8a672024b3a510763150b167320be6f1f5b /src/core/defs.h
parentd7e39a2423212a31c5ef62dcb0b7a5b4bf9f34df (diff)
downloadnng-4e668fdd5b5da0d46f97d835249dbe5f0ea319a7.tar.gz
nng-4e668fdd5b5da0d46f97d835249dbe5f0ea319a7.tar.bz2
nng-4e668fdd5b5da0d46f97d835249dbe5f0ea319a7.zip
fixes #84 Consider using msec for durations
There is now a public nng_duration type. We have also updated the zerotier work to work with the signed int64_t's that the latst ZeroTier dev branch is using.
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index ff02b28b..57f7f06a 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -53,8 +53,8 @@ typedef struct nni_thr nni_thr;
typedef void (*nni_thr_func)(void *);
typedef int nni_signal; // Wakeup channel.
-typedef uint64_t nni_time; // Abs. time (usec).
-typedef int64_t nni_duration; // Rel. time (usec).
+typedef uint64_t nni_time; // Abs. time (ms).
+typedef int32_t nni_duration; // Rel. time (ms).
typedef struct nni_aio nni_aio;
@@ -76,7 +76,7 @@ typedef struct {
// Some default timing things.
#define NNI_TIME_NEVER ((nni_time) -1)
#define NNI_TIME_ZERO ((nni_time) 0)
-#define NNI_SECOND (1000000)
+#define NNI_SECOND (1000)
// Structure allocation conveniences.
#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof(*s))