aboutsummaryrefslogtreecommitdiff
path: root/src/core/clock.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-12 18:34:58 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-12 21:34:23 -0800
commit70348e2d4725c9ec43f51811d290c22c782058ac (patch)
treed85ff38b4cb7d1ae0bbbc6b93f010fe5670181b0 /src/core/clock.c
parentda88419ae8165248621cad26df72a0d91663d50b (diff)
downloadnng-70348e2d4725c9ec43f51811d290c22c782058ac.tar.gz
nng-70348e2d4725c9ec43f51811d290c22c782058ac.tar.bz2
nng-70348e2d4725c9ec43f51811d290c22c782058ac.zip
Pull out the posix clock stuff for plat_clock.
Diffstat (limited to 'src/core/clock.c')
-rw-r--r--src/core/clock.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/clock.c b/src/core/clock.c
new file mode 100644
index 00000000..3e36358a
--- /dev/null
+++ b/src/core/clock.c
@@ -0,0 +1,23 @@
+//
+// Copyright 2017 Garrett D'Amore <garrett@damore.org>
+//
+// This software is supplied under the terms of the MIT License, a
+// copy of which should be located in the distribution where this
+// file was obtained (LICENSE.txt). A copy of the license may also be
+// found online at https://opensource.org/licenses/MIT.
+//
+
+#include "core/nng_impl.h"
+
+nni_time
+nni_clock(void)
+{
+ return (nni_plat_clock());
+}
+
+
+void
+nni_usleep(nni_duration usec)
+{
+ nni_plat_usleep(usec);
+}