File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ using node::ReadBlockFromDisk;
18
18
19
19
constexpr uint8_t DB_BEST_BLOCK{' B' };
20
20
21
- constexpr int64_t SYNC_LOG_INTERVAL = 30 ; // seconds
22
- constexpr int64_t SYNC_LOCATOR_WRITE_INTERVAL = 30 ; // seconds
21
+ constexpr auto SYNC_LOG_INTERVAL{30s};
22
+ constexpr auto SYNC_LOCATOR_WRITE_INTERVAL{30s};
23
23
24
24
template <typename ... Args>
25
25
static void FatalError (const char * fmt, const Args&... args)
@@ -130,8 +130,8 @@ void BaseIndex::ThreadSync()
130
130
if (!m_synced) {
131
131
auto & consensus_params = Params ().GetConsensus ();
132
132
133
- int64_t last_log_time = 0 ;
134
- int64_t last_locator_write_time = 0 ;
133
+ std::chrono::steady_clock::time_point last_log_time{0s} ;
134
+ std::chrono::steady_clock::time_point last_locator_write_time{0s} ;
135
135
while (true ) {
136
136
if (m_interrupt) {
137
137
SetBestBlockIndex (pindex);
@@ -160,7 +160,7 @@ void BaseIndex::ThreadSync()
160
160
pindex = pindex_next;
161
161
}
162
162
163
- int64_t current_time = GetTime () ;
163
+ auto current_time{ std::chrono::steady_clock::now ()} ;
164
164
if (last_log_time + SYNC_LOG_INTERVAL < current_time) {
165
165
LogPrintf (" Syncing %s with block chain from height %d\n " ,
166
166
GetName (), pindex->nHeight );
You can’t perform that action at this time.
0 commit comments