svn commit: r926917 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java

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

svn commit: r926917 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.java

doogie-3
Author: doogie
Date: Wed Mar 24 03:19:30 2010
New Revision: 926917

URL: http://svn.apache.org/viewvc?rev=926917&view=rev
Log:
Improve polish notation, by suffixing Nanos, and removing 'In' keyword.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/ExecutionPool.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=926917&r1=926916&r2=926917&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:19:30 2010
@@ -116,18 +116,18 @@ public final class ExecutionPool {
     }
 
     public static abstract class Pulse implements Delayed, Runnable {
-        protected final long expireTime;
+        protected final long expireTimeNanos;
 
-        protected Pulse(long delayInMillis) {
-            expireTime = System.nanoTime() + TimeUnit.NANOSECONDS.convert(delayInMillis, TimeUnit.MILLISECONDS);
+        protected Pulse(long delayMillis) {
+            expireTimeNanos = System.nanoTime() + TimeUnit.NANOSECONDS.convert(delayMillis, TimeUnit.MILLISECONDS);
         }
 
         public final long getDelay(TimeUnit unit) {
-            return unit.convert(expireTime - System.nanoTime(), TimeUnit.NANOSECONDS);
+            return unit.convert(expireTimeNanos - System.nanoTime(), TimeUnit.NANOSECONDS);
         }
 
         public final int compareTo(Delayed other) {
-            long r = (expireTime - ((Pulse) other).expireTime);
+            long r = (expireTimeNanos - ((Pulse) other).expireTimeNanos);
             if (r < 0) return -1;
             if (r > 0) return 1;
             return 0;