@@ -244,7 +244,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
244
244
std::atomic<bool > fScanningWallet {false }; // controlled by WalletRescanReserver
245
245
std::atomic<bool > m_attaching_chain{false };
246
246
std::atomic<bool > m_scanning_with_passphrase{false };
247
- std::atomic<int64_t > m_scanning_start{0 };
247
+ std::atomic<SteadyClock::time_point > m_scanning_start{SteadyClock::time_point{} };
248
248
std::atomic<double > m_scanning_progress{0 };
249
249
friend class WalletRescanReserver ;
250
250
@@ -465,7 +465,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
465
465
bool IsAbortingRescan () const { return fAbortRescan ; }
466
466
bool IsScanning () const { return fScanningWallet ; }
467
467
bool IsScanningWithPassphrase () const { return m_scanning_with_passphrase; }
468
- int64_t ScanningDuration () const { return fScanningWallet ? GetTimeMillis () - m_scanning_start : 0 ; }
468
+ SteadyClock::duration ScanningDuration () const { return fScanningWallet ? SteadyClock::now () - m_scanning_start. load () : SteadyClock::duration{} ; }
469
469
double ScanningProgress () const { return fScanningWallet ? (double ) m_scanning_progress : 0 ; }
470
470
471
471
// ! Upgrade stored CKeyMetadata objects to store key origin info as KeyOriginInfo
@@ -971,7 +971,7 @@ class WalletRescanReserver
971
971
return false ;
972
972
}
973
973
m_wallet.m_scanning_with_passphrase .exchange (with_passphrase);
974
- m_wallet.m_scanning_start = GetTimeMillis ();
974
+ m_wallet.m_scanning_start = SteadyClock::now ();
975
975
m_wallet.m_scanning_progress = 0 ;
976
976
m_could_reserve = true ;
977
977
return true ;
0 commit comments