Skip to content

Commit

Permalink
Explicitly cast nanoseconds to int64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
samestep committed Nov 12, 2024
1 parent 6260eb6 commit 95474da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions toolchain/base/timings.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ class Timings {
std::chrono::nanoseconds total_nanoseconds(0);
for (const auto& entry : timings_) {
total_nanoseconds += entry.nanoseconds;
label_map.Add(entry.label, entry.nanoseconds.count());
label_map.Add(entry.label, static_cast<int64_t>(
entry.nanoseconds.count()));
}
label_map.Add("Total", total_nanoseconds.count());
label_map.Add("Total",
static_cast<int64_t>(total_nanoseconds.count()));
}));
});
}
Expand Down

0 comments on commit 95474da

Please sign in to comment.