aboutsummaryrefslogtreecommitdiff
path: root/src/timedata.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-08-05 15:12:58 +0200
committerMacroFake <falke.marco@gmail.com>2022-08-05 14:59:15 +0200
commiteeee5ada23f2a71d245671556b6ecfdaabfeddf4 (patch)
tree3b2c3c56611816254a8a80eb2defca00d3421fde /src/timedata.cpp
parentfa3be799fe951a7ea9b4de78d5a907c6db71eeb8 (diff)
downloadbitcoin-eeee5ada23f2a71d245671556b6ecfdaabfeddf4.tar.xz
Make adjusted time type safe
Diffstat (limited to 'src/timedata.cpp')
-rw-r--r--src/timedata.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timedata.cpp b/src/timedata.cpp
index ceee08e68c..fe9a5fbed7 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -32,9 +32,9 @@ int64_t GetTimeOffset()
return nTimeOffset;
}
-int64_t GetAdjustedTime()
+NodeClock::time_point GetAdjustedTime()
{
- return GetTime() + GetTimeOffset();
+ return NodeClock::now() + std::chrono::seconds{GetTimeOffset()};
}
#define BITCOIN_TIMEDATA_MAX_SAMPLES 200