mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 08:16:03 +08:00
replay: fix current time (#38179)
This commit is contained in:
@@ -193,7 +193,7 @@ void Replay::startStream(const std::shared_ptr<Segment> segment) {
|
||||
auto event = reader.getRoot<cereal::Event>();
|
||||
uint64_t wall_time = event.getInitData().getWallTimeNanos();
|
||||
if (wall_time > 0) {
|
||||
route_date_time_ = wall_time / 1e6;
|
||||
route_date_time_ = wall_time / 1e9;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
std::atomic<bool> exit_ = false;
|
||||
std::atomic<bool> interrupt_requested_ = false;
|
||||
bool events_ready_ = false;
|
||||
std::time_t route_date_time_;
|
||||
std::time_t route_date_time_ = 0;
|
||||
uint64_t route_start_ts_ = 0;
|
||||
std::atomic<uint64_t> cur_mono_time_ = 0;
|
||||
cereal::Event::Which cur_which_ = cereal::Event::Which::INIT_DATA;
|
||||
|
||||
Reference in New Issue
Block a user