remove uv.h dependency in util/time.hpp
This commit is contained in:
@@ -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
13
src/util/time.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <mbgl/util/time.hpp>
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
timestamp now() {
|
||||
return uv_hrtime();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user