We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8c9c6e commit 2e9841bCopy full SHA for 2e9841b
src/datadog/clock.h
@@ -39,11 +39,15 @@ inline Duration operator-(const TimePoint& after, const TimePoint& before) {
39
}
40
41
inline TimePoint operator-(const TimePoint& origin, Duration offset) {
42
- return {origin.wall - offset, origin.tick - offset};
+ return {origin.wall -
43
+ std::chrono::duration_cast<std::chrono::system_clock::duration>(
44
+ offset),
45
+ origin.tick - offset};
46
47
48
inline TimePoint& operator+=(TimePoint& self, Duration offset) {
- self.wall += offset;
49
+ self.wall +=
50
+ std::chrono::duration_cast<std::chrono::system_clock::duration>(offset);
51
self.tick += offset;
52
return self;
53
0 commit comments