Skip to content

Commit

Permalink
fix negative timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
wirthual committed Sep 30, 2023
1 parent 04d820a commit eef0072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/examples/protobuf/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int main(int argc, char** argv) {

auto timestamp = pcl.mutable_timestamp();
timestamp->set_seconds(static_cast<int64_t>(cloudTime) / NS_PER_S);
timestamp->set_nanos(static_cast<int>(cloudTime) % NS_PER_S);
timestamp->set_nanos(static_cast<int>(cloudTime % NS_PER_S));

// write 1000 points into each pointcloud message.
size_t offset = 0;
Expand Down

0 comments on commit eef0072

Please sign in to comment.