r26604 - trunk/freenet/src/freenet/crypt
| Newsgroups | gmane.network.freenet.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: j16sdiz
Date: 2009-04-07 15:05:11 +0000 (Tue, 07 Apr 2009)
New Revision: 26604
Modified:
trunk/freenet/src/freenet/crypt/Yarrow.java
Log:
Count time only in DEBUG mode
System.currentTimeMillis() is slow, and we are in synchronized{}
Modified: trunk/freenet/src/freenet/crypt/Yarrow.java
===================================================================
--- trunk/freenet/src/freenet/crypt/Yarrow.java 2009-04-07 15:04:51 UTC (rev 26603)
+++ trunk/freenet/src/freenet/crypt/Yarrow.java 2009-04-07 15:05:11 UTC (rev 26604)
@@ -648,9 +648,11 @@
rekey(tmp);
Arrays.fill(v0, (byte) 0); // blank out for security
fast_entropy = 0;
+ if (DEBUG) {
long endTime = System.currentTimeMillis();
if(endTime - startTime > 5000)
Logger.normal(this, "Fast pool reseed took " + (endTime - startTime) + "ms");
+ }
}
private void slow_pool_reseed() {