This feature is not currently supported out of the box in Siddhi. You will need to write a custom extension for a Time Window to achieve this. You can refer to the Siddhi documentation at [1] to learn more about writing a custom window processor for Siddhi.
[1] https://docs.wso2.org/display/CEP300/Writing+a+Custom+Window