mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
WalletFiles: log how long saving the wallet took.
This commit is contained in:
parent
5219a42df9
commit
2b6022cd7c
@ -114,6 +114,7 @@ public class WalletFiles {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void saveNowInternal() throws IOException {
|
private void saveNowInternal() throws IOException {
|
||||||
|
long now = System.currentTimeMillis();
|
||||||
File directory = file.getAbsoluteFile().getParentFile();
|
File directory = file.getAbsoluteFile().getParentFile();
|
||||||
File temp = File.createTempFile("wallet", null, directory);
|
File temp = File.createTempFile("wallet", null, directory);
|
||||||
final Listener listener = vListener;
|
final Listener listener = vListener;
|
||||||
@ -122,6 +123,7 @@ public class WalletFiles {
|
|||||||
wallet.saveToFile(temp, file);
|
wallet.saveToFile(temp, file);
|
||||||
if (listener != null)
|
if (listener != null)
|
||||||
listener.onAfterAutoSave(file);
|
listener.onAfterAutoSave(file);
|
||||||
|
log.info("Save completed in {}msec", System.currentTimeMillis() - now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Queues up a save in the background. Useful for not very important wallet changes. */
|
/** Queues up a save in the background. Useful for not very important wallet changes. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user