Create window at the good time