So, milli/nano is 1E6, not 1E3, thanks Ray.

This commit is contained in:
Par Winzell
2009-06-03 18:49:45 +00:00
parent bde9404ca5
commit fce2c05f9b
+2 -2
View File
@@ -103,9 +103,9 @@ public class Stats
boolean isReadOnly, long preConnect, long preInvoke, long postInvoke) boolean isReadOnly, long preConnect, long preInvoke, long postInvoke)
{ {
_totalOps++; _totalOps++;
_connectionWaitTime += (preInvoke - preConnect) / 1000L; _connectionWaitTime += (preInvoke - preConnect) / 1000000L;
long opTime = (postInvoke - preInvoke) / 1000L; long opTime = (postInvoke - preInvoke) / 1000000L;
if (opTime > Integer.MAX_VALUE) { if (opTime > Integer.MAX_VALUE) {
log.warning("ZOMG! A database operation took " + opTime + "ms to complete!"); log.warning("ZOMG! A database operation took " + opTime + "ms to complete!");
opTime = Integer.MAX_VALUE; opTime = Integer.MAX_VALUE;