@Override
    public void process(ComplexEventChunk complexEventChunk) {

        StreamPreState state = stateHolder.getState();
        try {
            if (!((LogicalStreamPreState) state).active) {
                return;
            }
            boolean notProcessed = true;
            ComplexEventChunk<StateEvent> retEventChunk = new ComplexEventChunk<>();
            this.lock.lock();
            try {
                long currentTime = complexEventChunk.getFirst().getTimestamp();
                if (currentTime >= ((LogicalStreamPreState) state).lastArrivalTime + waitingTime) {
                    Iterator<StateEvent> iterator;
                    if (isStartState && stateType == StateInputStream.Type.SEQUENCE &&
                            state.getNewAndEveryStateEventList().isEmpty() &&
                            state.getPendingStateEventList().isEmpty()) {

                        StateEvent stateEvent = stateEventFactory.newInstance();
                        addState(stateEvent);
                    } else if (stateType == StateInputStream.Type.SEQUENCE &&
                            !state.getNewAndEveryStateEventList().isEmpty()) {
                        this.resetState();
                    }
                    this.updateState();

                    StateEvent expiredStateEvent = null;
                    iterator = state.getPendingStateEventList().iterator();
                    while (iterator.hasNext()) {
                        StateEvent stateEvent = iterator.next();
                        // Remove expired events based on within
                        if (isExpired(stateEvent, currentTime)) {
                            expiredStateEvent = stateEvent;
                            iterator.remove();
                            continue;
                        }
                        // Collect the events that came before the waiting time
                        if (waitingTimePassed(currentTime, stateEvent)) {
                            iterator.remove();
                            if (logicalType == LogicalStateElement.Type.OR && stateEvent.getStreamEvent
                                    (partnerStatePreProcessor.getStateId()) == null) {
                                // OR Partner not received
                                stateEvent.addEvent(stateId, streamEventFactory.newInstance());
                                retEventChunk.add(stateEvent);
                            } else if (logicalType == LogicalStateElement.Type.AND && stateEvent.getStreamEvent
                                    (partnerStatePreProcessor.getStateId()) != null) {
                                // AND partner received but didn't send out
                                retEventChunk.add(stateEvent);
                            } else if (logicalType == LogicalStateElement.Type.AND && stateEvent.getStreamEvent
                                    (partnerStatePreProcessor.getStateId()) == null) {
                                // AND partner didn't receive
                                // Let the partner to process or not
                                stateEvent.addEvent(stateId, streamEventFactory.newInstance());
                            }
                        }
                    }
                    if (expiredStateEvent != null && withinEveryPreStateProcessor != null) {
                        withinEveryPreStateProcessor.addEveryState(expiredStateEvent);
                        withinEveryPreStateProcessor.updateState();
                    }
                    retEventChunk.reset();
                    notProcessed = retEventChunk.getFirst() == null;
                    while (retEventChunk.hasNext()) {
                        StateEvent stateEvent = retEventChunk.next();
                        retEventChunk.remove();
                        stateEvent.setTimestamp(currentTime);
                        sendEvent(stateEvent, state);
                    }
                    ((LogicalStreamPreState) state).lastArrivalTime = 0;
                }
            } finally {
                this.lock.unlock();
            }

            if (thisStatePostProcessor.nextEveryStatePreProcessor != null || (notProcessed && isStartState)) {
                // If every or (notProcessed and startState), schedule again
                long nextBreak;
                if (((LogicalStreamPreState) state).lastArrivalTime == 0) {
                    nextBreak = siddhiQueryContext.getSiddhiAppContext().getTimestampGenerator().currentTime() +
                            waitingTime;
                } else {
                    nextBreak = ((LogicalStreamPreState) state).lastArrivalTime + waitingTime;
                }
                this.scheduler.notifyAt(nextBreak);
            }
        } 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