Convert aos over to flatbuffers
Everything builds, and all the tests pass. I suspect that some entries
are missing from the config files, but those will be found pretty
quickly on startup.
There is no logging or live introspection of queue messages.
Change-Id: I496ee01ed68f202c7851bed7e8786cee30df29f5
diff --git a/aos/time/time.cc b/aos/time/time.cc
index 9736009..6c2d254 100644
--- a/aos/time/time.cc
+++ b/aos/time/time.cc
@@ -8,10 +8,6 @@
#ifdef __linux__
-// We only use global_core from here, which is weak, so we don't really have a
-// dependency on it.
-#include "aos/ipc_lib/shared_mem.h"
-
#include "aos/mutex/mutex.h"
#include "glog/logging.h"
@@ -103,15 +99,6 @@
SetMockTime(monotonic_clock::now() + amount);
}
-void OffsetToNow(monotonic_clock::time_point now) {
- CHECK_NOTNULL(&global_core);
- CHECK_NOTNULL(global_core);
- CHECK_NOTNULL(global_core->mem_struct);
- const auto offset = now - monotonic_clock::now();
- global_core->mem_struct->time_offset =
- chrono::duration_cast<chrono::nanoseconds>(offset).count();
-}
-
#endif // __linux__
struct timespec to_timespec(
@@ -150,14 +137,8 @@
<< ": clock_gettime(" << static_cast<uintmax_t>(CLOCK_MONOTONIC) << ", "
<< ¤t_time << ") failed";
- const chrono::nanoseconds offset =
- (&global_core == nullptr || global_core == nullptr ||
- global_core->mem_struct == nullptr)
- ? chrono::nanoseconds(0)
- : chrono::nanoseconds(global_core->mem_struct->time_offset);
-
return time_point(::std::chrono::seconds(current_time.tv_sec) +
- ::std::chrono::nanoseconds(current_time.tv_nsec)) + offset;
+ ::std::chrono::nanoseconds(current_time.tv_nsec));
#else // __linux__