Undistract-me is a nifty little add-on to Bash that will automatically create a NotifyOSD dialog if a shell command has taken longer than 10 seconds. It does this by creating a hook before and after commands are typed into the shell. While this is really cool, I use ZSH and simply sourcing the code from Undistract-me is not an option.
ZSH already has preexec and precmd functions to trap these types of events. That makes porting this type of feature over to ZSH quite simple.