private void filterFaults() {
        long from = System.currentTimeMillis() - this.timeWindowMillis;
        long to = System.currentTimeMillis();
        Set<CircuitFault> toRemove = new HashSet<>();
        for (CircuitFault fault : faults) {
            if (!fault.isInWindow(from, to)) {
                toRemove.add(fault);
            }
        }
        faults.removeAll(toRemove);
    }
Filter the faults based on the time window.
plugins/circuit-breaker-policy/src/main/java/io/apiman/plugins/circuit_breaker/Circuit.java