In case you're not aware watch(1) performs basically that task: watch -n 5 "ps -eaf | grep blablabla". It can also highlight changes in the text, break itself out of the loop under conditions, and a few other things.
The major difference between your function and watch being that watch will use the alternate screen for output if possible.