Skip to content

Commit

Permalink
Merge pull request #338 from ros-drivers/327-fix-timestamp
Browse files Browse the repository at this point in the history
Keep units as microseconds, not nanoseconds
  • Loading branch information
flynneva authored Jun 22, 2024
2 parents 52dd75f + ee0a2f7 commit 501af3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/usb_cam/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ inline time_t get_epoch_time_shift_us()
monotonic_time.tv_sec * 1000000 + static_cast<int64_t>(
std::round(monotonic_time.tv_nsec / 1000.0));
const int64_t epoch_us =
epoch_time.tv_sec * 1000000 + epoch_time.tv_usec / 1000.0;
epoch_time.tv_sec * 1000000 + epoch_time.tv_usec;

return static_cast<time_t>(epoch_us - uptime_us);
}
Expand Down

0 comments on commit 501af3d

Please sign in to comment.