From b06e33f5ee73d5d480c52c9f548a83cb8288223b Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 12 Feb 2009 15:33:28 +0000 Subject: [PATCH] Changed the default time unit to SECONDS --- .../jboss/netty/handler/timeout/IdleStateHandler.java | 10 +++++----- .../netty/handler/timeout/ReadTimeoutHandler.java | 4 ++-- .../netty/handler/timeout/WriteTimeoutHandler.java | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java b/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java index c624bb570b..8151e4382f 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java @@ -63,13 +63,13 @@ public class IdleStateHandler extends SimpleChannelUpstreamHandler public IdleStateHandler( Timer timer, - long readerIdleTimeMillis, - long writerIdleTimeMillis, - long allIdleTimeMillis) { + long readerIdleTimeSeconds, + long writerIdleTimeSeconds, + long allIdleTimeSeconds) { this(timer, - readerIdleTimeMillis, writerIdleTimeMillis, allIdleTimeMillis, - TimeUnit.MILLISECONDS); + readerIdleTimeSeconds, writerIdleTimeSeconds, allIdleTimeSeconds, + TimeUnit.SECONDS); } public IdleStateHandler( diff --git a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java index d91dc2a923..a2f01cbfd4 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java @@ -49,8 +49,8 @@ public class ReadTimeoutHandler extends SimpleChannelUpstreamHandler implements private volatile ReadTimeoutTask task; volatile long lastReadTime; - public ReadTimeoutHandler(Timer timer, long timeoutMillis) { - this(timer, timeoutMillis, TimeUnit.MILLISECONDS); + public ReadTimeoutHandler(Timer timer, long timeoutSeconds) { + this(timer, timeoutSeconds, TimeUnit.SECONDS); } public ReadTimeoutHandler(Timer timer, long timeout, TimeUnit unit) { diff --git a/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java b/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java index faa084fa22..b8dd80d20b 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutHandler.java @@ -46,8 +46,8 @@ public class WriteTimeoutHandler extends SimpleChannelDownstreamHandler implemen private final Timer timer; private final long timeoutMillis; - public WriteTimeoutHandler(Timer timer, long timeoutMillis) { - this(timer, timeoutMillis, TimeUnit.MILLISECONDS); + public WriteTimeoutHandler(Timer timer, long timeoutSeconds) { + this(timer, timeoutSeconds, TimeUnit.SECONDS); } public WriteTimeoutHandler(Timer timer, long timeout, TimeUnit unit) {