Skip to content

Commit b62db76

Browse files
Revert " Add real timestamp to log output when mock time is enabled (#2604)"
This reverts commit 968eb3f. Signed-off-by: Pasta <pasta@dashboost.org> # Conflicts: # src/util.cpp # src/utiltime.cpp # src/utiltime.h
1 parent 2ab30b8 commit b62db76

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

src/util.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,8 @@ static std::string LogTimestampStr(const std::string &str, std::atomic_bool *fSt
375375
return str;
376376

377377
if (*fStartedNewLine) {
378-
if (IsMockTime()) {
379-
int64_t nRealTimeMicros = GetTimeMicros();
380-
strStamped = DateTimeStrFormat("(real %Y-%m-%d %H:%M:%S) ", nRealTimeMicros/1000000);
381-
}
382378
int64_t nTimeMicros = GetTimeMicros();
383-
strStamped += DateTimeStrFormat("%Y-%m-%d %H:%M:%S", nTimeMicros/1000000);
379+
strStamped = DateTimeStrFormat("%Y-%m-%d %H:%M:%S", nTimeMicros/1000000);
384380
if (fLogTimeMicros)
385381
strStamped += strprintf(".%06d", nTimeMicros%1000000);
386382
int64_t mocktime = GetMockTime();

src/utiltime.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ void SetMockTime(int64_t nMockTimeIn)
3232
nMockTime.store(nMockTimeIn, std::memory_order_relaxed);
3333
}
3434

35-
bool IsMockTime()
36-
{
37-
return nMockTime != 0;
38-
}
39-
4035
int64_t GetMockTime()
4136
{
4237
return nMockTime.load(std::memory_order_relaxed);

src/utiltime.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ int64_t GetTimeMillis();
2424
int64_t GetTimeMicros();
2525
int64_t GetSystemTimeInSeconds(); // Like GetTime(), but not mockable
2626
void SetMockTime(int64_t nMockTimeIn);
27-
bool IsMockTime();
2827
int64_t GetMockTime();
2928
void MilliSleep(int64_t n);
3029

0 commit comments

Comments
 (0)