svn commit: r926918 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent: ExecutionPool.java TTLObject.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r926918 - in /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent: ExecutionPool.java TTLObject.java

doogie-3
Author: doogie
Date: Wed Mar 24 03:20:01 2010
New Revision: 926918

URL: http://svn.apache.org/viewvc?rev=926918&view=rev
Log:
Change delayMillis to delayNanos.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java?rev=926918&r1=926917&r2=926918&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java Wed Mar 24 03:20:01 2010
@@ -118,8 +118,8 @@ public final class ExecutionPool {
     public static abstract class Pulse implements Delayed, Runnable {
         protected final long expireTimeNanos;
 
-        protected Pulse(long delayMillis) {
-            expireTimeNanos = System.nanoTime() + TimeUnit.NANOSECONDS.convert(delayMillis, TimeUnit.MILLISECONDS);
+        protected Pulse(long delayNanos) {
+            expireTimeNanos = System.nanoTime() + delayNanos;
         }
 
         public final long getDelay(TimeUnit unit) {

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java?rev=926918&r1=926917&r2=926918&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java Wed Mar 24 03:20:01 2010
@@ -25,6 +25,7 @@ import java.util.concurrent.ConcurrentHa
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 
@@ -157,7 +158,7 @@ public abstract class TTLObject<T> imple
         protected final TTLObject<?> ttlObject;
 
         protected Pulse(TTLObject<?> ttlObject) {
-            super(ttlObject.getTTL());
+            super(TimeUnit.NANOSECONDS.convert(ttlObject.getTTL(), TimeUnit.MILLISECONDS));
             this.ttlObject = ttlObject;
         }