“email time window mins” is the variable you’re looking for, but there is also a user setting with a name like “email notification even if online” and a corresponding default value in site settings.
Mostly it is good not to get an email for a message got have seen already. If your users love email, you can turn on mailing list mode.