How long should I wait before creating an undo command when I’m typing text?

I'm working on an undo chain in my project. I want to avoid undoing individual letters, but instead undo chunks of text. Therefore, I'm working with a debounce.

Is there a standard waiting time or a best practice to follow? I see that browsers and Word all work approximately the same, so I thought there might be a standard way of doing this.