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;
if (maxTime >= time) {
return false;
}
long prevTime = now - prev; long prevTime = now - prev;
boolean ret = maxTime < time; try {
if (ret) { return prevMaxTime > prevTime;
if (prev != start && prevMaxTime > prevTime) { } finally {
return false; this.prev = now;
}
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