Commit 01a1759b authored by yanzg's avatar yanzg

将源码打包进jar包

parent adfa3624
......@@ -71,14 +71,14 @@ public class Timeout<T extends Object> {
public boolean isMaxTime(long maxTime, long prevMaxTime) {
long now = System.currentTimeMillis();
long time = now - start;
if (maxTime >= time) {
return false;
}
long prevTime = now - prev;
boolean ret = maxTime < time;
if (ret) {
if (prev != start && prevMaxTime > prevTime) {
return false;
}
prev = now;
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