Commit f11c0a43 authored by yanzg's avatar yanzg

将源码打包进jar包

parent 417ea60b
......@@ -30,7 +30,7 @@ public class Timeout<T> {
*/
public Timeout(T data) {
this.start = System.currentTimeMillis();
this.prev = start;
this.prev = 0;
this.data = data;
}
......@@ -65,8 +65,7 @@ public class Timeout<T> {
if (maxTime >= time) {
return false;
}
long prevMax = Math.max(prev, start + maxTime);
long prevTime = now - prevMax;
long prevTime = now - prev;
try {
return prevMaxTime > prevTime;
} finally {
......
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