One-liner generic timing function

Generic higher-order function to measure timing of a given function