aboutsummaryrefslogtreecommitdiff
path: root/src/logging.cpp
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2021-02-10 18:30:51 -0800
committerAmiti Uttarwar <amiti@uttarwar.org>2021-02-16 12:23:00 -0800
commitdf6a5fc1dff3b1b7c2f2b67aad1ff17cac99f7b6 (patch)
treeb1edc583b5a7304383570837f28bdd19d86b51ad /src/logging.cpp
parenta2d908e1daa1d1be74568bd7d1d04b724da7d79c (diff)
downloadbitcoin-df6a5fc1dff3b1b7c2f2b67aad1ff17cac99f7b6.tar.xz
[util] Change GetMockTime to return chrono type instead of int
Diffstat (limited to 'src/logging.cpp')
-rw-r--r--src/logging.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logging.cpp b/src/logging.cpp
index 4ddcf1d930..529bb11d5b 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -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