Run f, recording its duration under step if init has been called.
Never holds the recorder lock across f, so a timed step may itself
contain timed steps without deadlocking. Uninitialized (unit tests,
the migrate subcommand, anything that never calls init) it is a
transparent pass-through.