Make adjusted time type safe

This commit is contained in:
MacroFake
2022-08-05 15:12:58 +02:00
parent fa3be799fe
commit eeee5ada23
8 changed files with 19 additions and 16 deletions

View File

@@ -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