Measure and log code execution time in milliseconds.
the log level
the action performed
the function to run