By default, Gmail allows you to unsend an email within 5 seconds of clicking the send button. As soon as you click send, you’ll see a dialog in the bottom-left corner with an “Undo” link. If you’re on your mobile device, you’ll see a similar dialog at the bottom.
I found that 5 seconds is a bit fast. I usually don’t realize I’ve accidentally done a reply-all (or worse mistakes) until a few seconds later. Thankfully, Gmail allows you to configure the delay.
Go to Settings -> See all settings ->