remove uv.h dependency in util/time.hpp

This commit is contained in:
Konstantin Käfer
2014-08-11 17:39:57 +02:00
parent 7a98ad4cf9
commit e4c311a864
2 changed files with 16 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
#ifndef MBGL_UTIL_TIME
#define MBGL_UTIL_TIME
#include <uv.h>
#include <cstdint>
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

13
src/util/time.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include <mbgl/util/time.hpp>
#include <uv.h>
namespace mbgl {
namespace util {
timestamp now() {
return uv_hrtime();
}
}
}