Simple helper function to log how long a given task took.
The result of the given block
The lambda invoked with the measured duration (Duration) of the given block.
The code block to time.