If you're fumigating for bugs in your home you should stay out of your home for at least 4 hours after the windows have been opened.
If you're just spraying for bugs then an hour or 2 should be sufficient for staying outside your home with the windows open.