[util] Change GetMockTime to return chrono type instead of int

This commit is contained in:
Amiti Uttarwar
2021-02-10 18:30:51 -08:00
parent a2d908e1da
commit df6a5fc1df
3 changed files with 7 additions and 6 deletions

View File

@@ -203,9 +203,9 @@ std::string BCLog::Logger::LogTimestampStr(const std::string& str)
strStamped.pop_back();
strStamped += strprintf(".%06dZ", nTimeMicros%1000000);
}
int64_t mocktime = GetMockTime();
if (mocktime) {
strStamped += " (mocktime: " + FormatISO8601DateTime(mocktime) + ")";
std::chrono::seconds mocktime = GetMockTime();
if (mocktime > 0s) {
strStamped += " (mocktime: " + FormatISO8601DateTime(count_seconds(mocktime)) + ")";
}
strStamped += ' ' + str;
} else