@Override
    public ComplexEventChunk<StateEvent> processAndReturn(ComplexEventChunk complexEventChunk) {

        ComplexEventChunk<StateEvent> returnEventChunk = new ComplexEventChunk<>();
        StreamPreState state = stateHolder.getState();
        try {

            if (!((LogicalStreamPreState) state).active) {
                return returnEventChunk;
            }
            complexEventChunk.reset();
            StreamEvent streamEvent = (StreamEvent) complexEventChunk.next(); //Sure only one will be sent
            this.lock.lock();
            try {
                for (Iterator<StateEvent> iterator = state.getPendingStateEventList().iterator();
                     iterator.hasNext(); ) {
                    StateEvent stateEvent = iterator.next();
                    if (logicalType == LogicalStateElement.Type.OR &&
                            stateEvent.getStreamEvent(partnerStatePreProcessor.getStateId()) != null) {
                        iterator.remove();
                        continue;
                    }
                    StreamEvent currentStreamEvent = stateEvent.getStreamEvent(stateId);
                    stateEvent.setEvent(stateId, streamEventCloner.copyStreamEvent(streamEvent));
                    process(stateEvent);
                    if (waitingTime != -1 || (stateType == StateInputStream.Type.SEQUENCE &&
                            logicalType == LogicalStateElement.Type.AND && thisStatePostProcessor
                            .nextEveryStatePreProcessor != null)) {
                        // Reset to the original state after processing
                        stateEvent.setEvent(stateId, currentStreamEvent);
                    }
                    if (this.thisLastProcessor.isEventReturned()) {
                        this.thisLastProcessor.clearProcessedEvent();
                        // The event has passed the filter condition. So remove from being an absent candidate.
                        iterator.remove();
                        if (stateType == StateInputStream.Type.SEQUENCE) {
                            partnerStatePreProcessor.getPendingStateEventList().remove(stateEvent);
                        }
                    }
                    if (!state.isStateChanged()) {
                        switch (stateType) {
                            case PATTERN:
                                stateEvent.setEvent(stateId, currentStreamEvent);
                                break;
                            case SEQUENCE:
                                stateEvent.setEvent(stateId, currentStreamEvent);
                                iterator.remove();
                                break;
                        }
                    }
                }
            } finally {
                this.lock.unlock();
            }
            return returnEventChunk;
        } finally {
            stateHolder.returnState(state);
        }
    }
The time defined by 'for' in an absence pattern.
modules/siddhi-core/src/main/java/io/siddhi/core/query/input/stream/state/AbsentLogicalPreStateProcessor.java