From e4c311a864d522e402b67f5393f57d0f663330e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Mon, 11 Aug 2014 17:39:57 +0200 Subject: [PATCH] remove uv.h dependency in util/time.hpp --- include/mbgl/util/time.hpp | 7 +++---- src/util/time.cpp | 13 +++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 src/util/time.cpp diff --git a/include/mbgl/util/time.hpp b/include/mbgl/util/time.hpp index eacee2c98..9d61edf75 100644 --- a/include/mbgl/util/time.hpp +++ b/include/mbgl/util/time.hpp @@ -1,7 +1,7 @@ #ifndef MBGL_UTIL_TIME #define MBGL_UTIL_TIME -#include +#include namespace mbgl { @@ -13,9 +13,8 @@ namespace util { // Returns time in nanoseconds since an arbitrary point in the past. This has // no relation to the current time, but is continuously increasing, so // comparisons between different timestamps produce meaningful values. -inline timestamp now() { - return uv_hrtime(); -} +timestamp now(); + } // used for time conversions diff --git a/src/util/time.cpp b/src/util/time.cpp new file mode 100644 index 000000000..493a6ccfa --- /dev/null +++ b/src/util/time.cpp @@ -0,0 +1,13 @@ +#include + +#include + +namespace mbgl { +namespace util { + +timestamp now() { + return uv_hrtime(); +} + +} +}