001package ch.qos.logback.core.util;
002
003public class FixedRateInvocationGate implements InvocationGate {
004
005    int rate;
006    int invocationCount = 0;
007
008    public FixedRateInvocationGate(int rate) {
009        this.rate = rate;
010    }
011
012    @Override
013    public boolean isTooSoon(long currentTime) {
014        if (invocationCount++ % rate != 0)
015            return true;
016        return false;
017    }
018
019}