private void initTimeParameter(ExpressionExecutor attributeExpressionExecutor) {
        if (attributeExpressionExecutor instanceof ConstantExpressionExecutor) {
            if (attributeExpressionExecutor.getReturnType() == Attribute.Type.INT) {
                timeInMilliSeconds = (Integer) ((ConstantExpressionExecutor) attributeExpressionExecutor)
                        .getValue();

            } else if (attributeExpressionExecutor.getReturnType() == Attribute.Type.LONG) {
                timeInMilliSeconds = (Long) ((ConstantExpressionExecutor) attributeExpressionExecutor)
                        .getValue();
            } else {
                throw new SiddhiAppValidationException("TimeBatch window's window.time (1st) parameter 'window.time' " +
                        "should be either int or long, but found " + attributeExpressionExecutor.getReturnType());
            }
        } else {
            throw new SiddhiAppValidationException("TimeBatch window's window.time (1st) parameter 'window.time' " +
                    "should be a constant but found a dynamic attribute " +
                    attributeExpressionExecutor.getClass().getCanonicalName());
        }
    }
Implementation of {@link WindowProcessor} which represent a Batch Window operating based on time.
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/window/TimeBatchWindowProcessor.java