Skip to content

Commit

Permalink
ts to tsDevice fix
Browse files Browse the repository at this point in the history
  • Loading branch information
asahtik committed Aug 15, 2023
1 parent ebb1ed3 commit 2a25f0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pipeline/datatype/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Buffer& Buffer::setTimestampDevice(std::chrono::time_point<std::chrono::steady_c
using namespace std::chrono;
auto ts = tp.time_since_epoch();
raw->tsDevice.sec = duration_cast<seconds>(ts).count();
raw->ts.nsec = duration_cast<nanoseconds>(ts).count() % 1000000000;
raw->tsDevice.nsec = duration_cast<nanoseconds>(ts).count() % 1000000000;
return *this;
}
Buffer& Buffer::setSequenceNum(int64_t sequenceNum) {
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/datatype/NNData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ NNData& NNData::setTimestampDevice(std::chrono::time_point<std::chrono::steady_c
using namespace std::chrono;
auto ts = tp.time_since_epoch();
rawNn.tsDevice.sec = duration_cast<seconds>(ts).count();
rawNn.ts.nsec = duration_cast<nanoseconds>(ts).count() % 1000000000;
rawNn.tsDevice.nsec = duration_cast<nanoseconds>(ts).count() % 1000000000;
return *this;
}
NNData& NNData::setSequenceNum(int64_t sequenceNum) {
Expand Down

0 comments on commit 2a25f0f

Please sign in to comment.