@@ -244,7 +244,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
244244 std::atomic<bool > fScanningWallet {false }; // controlled by WalletRescanReserver
245245 std::atomic<bool > m_attaching_chain{false };
246246 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{} };
248248 std::atomic<double > m_scanning_progress{0 };
249249 friend class WalletRescanReserver ;
250250
@@ -465,7 +465,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
465465 bool IsAbortingRescan () const { return fAbortRescan ; }
466466 bool IsScanning () const { return fScanningWallet ; }
467467 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{} ; }
469469 double ScanningProgress () const { return fScanningWallet ? (double ) m_scanning_progress : 0 ; }
470470
471471 // ! Upgrade stored CKeyMetadata objects to store key origin info as KeyOriginInfo
@@ -971,7 +971,7 @@ class WalletRescanReserver
971971 return false ;
972972 }
973973 m_wallet.m_scanning_with_passphrase .exchange (with_passphrase);
974- m_wallet.m_scanning_start = GetTimeMillis ();
974+ m_wallet.m_scanning_start = SteadyClock::now ();
975975 m_wallet.m_scanning_progress = 0 ;
976976 m_could_reserve = true ;
977977 return true ;
0 commit comments