Time a function with one line of code