Allow window to be -1, which means skipping timestamp check