Add snippet on timing "function"

I've been using several ways of doing such a "timing function" over the
last weeks and always have a hard time remembering how to do a
appropriately nice output formatting. Thus saving a snippet on how one
could make such a timing loop.