diff --git a/CMakeLists.txt b/CMakeLists.txt index 034c65d..0cd2546 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ set(headers set(sources src/espchrono.cpp - src/espchrono_espimpl.cpp ) -idf_component_register(INCLUDE_DIRS src SRCS ${headers} ${sources} REQUIRES freertos esp_system cpputils date espcpputils) +idf_component_register(INCLUDE_DIRS src SRCS ${headers} ${sources} REQUIRES freertos esp_system cpputils date) diff --git a/src/espchrono_espimpl.cpp b/src/espchrono_espimpl.cpp deleted file mode 100644 index 1e89343..0000000 --- a/src/espchrono_espimpl.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// local includes -#include "espchrono.h" - -// system includes -#include - -// esp-idf inlcludes -#include - -using namespace std::chrono_literals; - -// actual implementations used on the ESP32 - -namespace espchrono { -auto utc_clock::now() noexcept -> time_point -{ - timeval tv; - gettimeofday(&tv, NULL); - seconds32 seconds{tv.tv_sec}; - return time_point{seconds}; -} - -auto millis_clock::now() noexcept -> time_point -{ - return time_point{std::chrono::floor(std::chrono::microseconds{esp_timer_get_time()})}; -} -} // namespace espchrono