Commit 01a1759b authored by yanzg's avatar yanzg

将源码打包进jar包

parent adfa3624
...@@ -71,14 +71,14 @@ public class Timeout<T extends Object> { ...@@ -71,14 +71,14 @@ public class Timeout<T extends Object> {
public boolean isMaxTime(long maxTime, long prevMaxTime) { public boolean isMaxTime(long maxTime, long prevMaxTime) {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
long time = now - start; long time = now - start;
long prevTime = now - prev; if (maxTime >= time) {
boolean ret = maxTime < time;
if (ret) {
if (prev != start && prevMaxTime > prevTime) {
return false; return false;
} }
prev = now; long prevTime = now - prev;
try {
return prevMaxTime > prevTime;
} finally {
this.prev = now;
} }
return ret;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment