private void idleCheck0(NioChannelImpl channel, long currentTime) {

            IdleInfo idle = channel.getIdleInfo();

            long lastReadTime = idle.getLastReadTime();
            long lastWriteTime = idle.getLastWriteTime();

            long lastIoTime = Math.max(lastReadTime, lastWriteTime);
            NioConfig config = channel.getConfig();

            if (config.getIdleTimeBoth() > 0) {
                notifyIdle(channel, IdleState.BOTH_IDLE, currentTime, config.getIdleTimeBoth() * 1000,
                        Math.max(lastIoTime, idle.getLastBothIdleTime()));
            }

            if (config.getIdleTimeRead() > 0) {
                notifyIdle(channel, IdleState.READER_IDLE, currentTime, config.getIdleTimeRead() * 1000,
                        Math.max(lastIoTime, idle.getLastReadIdleTime()));
            }

            if (config.getIdleTimeWrite() > 0) {
                notifyIdle(channel, IdleState.WRITER_IDLE, currentTime, config.getIdleTimeWrite() * 1000,
                        Math.max(lastIoTime, idle.getLastWriteIdleTime()));
            }

            notifyWriteTimeout(channel, currentTime);
        }
@author Robert HG (254963746@qq.com) on 1/24/16.
lts-core/src/main/java/com/github/ltsopensource/nio/idle/IdleDetector.java