Send more information to each camera
This is what I'm thinking so Parker can write code for it.
Change-Id: I766747ed6c1bf5adc8d1c29e5d1896b8806b6eb9
diff --git a/aos/time/time.cc b/aos/time/time.cc
index f585192..06f4b12 100644
--- a/aos/time/time.cc
+++ b/aos/time/time.cc
@@ -185,5 +185,17 @@
#endif // __linux__
}
+#ifdef __linux__
+realtime_clock::time_point realtime_clock::now() noexcept {
+ struct timespec current_time;
+ if (clock_gettime(CLOCK_REALTIME, ¤t_time) != 0) {
+ PLOG(FATAL, "clock_gettime(%jd, %p) failed",
+ static_cast<uintmax_t>(CLOCK_REALTIME), ¤t_time);
+ }
+
+ return time_point(::std::chrono::seconds(current_time.tv_sec) +
+ ::std::chrono::nanoseconds(current_time.tv_nsec));
+}
+#endif // __linux__
} // namespace aos