Skip to content

Commit 997c6c6

Browse files
committed
use duration_cast
1 parent f50a3f0 commit 997c6c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/viam/sdk/common/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ time_pt timestamp_to_time_pt(const google::protobuf::Timestamp& timestamp) {
4040
google::protobuf::Timestamp time_pt_to_timestamp(time_pt tp) {
4141
const std::chrono::nanoseconds since_epoch = tp.time_since_epoch();
4242

43-
const auto sec_floor = std::chrono::floor<std::chrono::seconds>(since_epoch);
43+
const auto sec_floor = std::chrono::duration_cast<std::chrono::seconds>(since_epoch);
4444
const std::chrono::nanoseconds nano_part = since_epoch - sec_floor;
4545

4646
google::protobuf::Timestamp result;

0 commit comments

Comments
 (0)