format multiplies by 100, so complete is 1.0

This commit is contained in:
zzz
2015-09-20 11:08:27 +00:00
parent 02a0ef3526
commit b81cbedd5c
2 changed files with 6 additions and 6 deletions

View File

@ -746,15 +746,15 @@ public class Snark
} }
/** /**
* If checking is in progress, return completion 0-100, * If checking is in progress, return completion 0.0 ... 1.0,
* else return 100. * else return 1.0.
* @since 0.9.23 * @since 0.9.23
*/ */
public double getCheckingProgress() { public double getCheckingProgress() {
if (storage != null && storage.isChecking()) if (storage != null && storage.isChecking())
return storage.getCheckingProgress(); return storage.getCheckingProgress();
else else
return 100.0d; return 1.0d;
} }
/** /**

View File

@ -313,15 +313,15 @@ public class Storage implements Closeable
} }
/** /**
* If checking is in progress, return completion 0-100, * If checking is in progress, return completion 0.0 ... 1.0,
* else return 100. * else return 1.0.
* @since 0.9.23 * @since 0.9.23
*/ */
public double getCheckingProgress() { public double getCheckingProgress() {
if (_isChecking) if (_isChecking)
return _checkProgress.get() / (double) pieces; return _checkProgress.get() / (double) pieces;
else else
return 100.0d; return 1.0d;
} }
/** /**