Stopwatch that logs the elapsed time when it is disposed, such as with using or by adding it to
the extension's subscriptions.
The lambda runs only on disposal, and only when the level it returns is enabled, so the message
costs nothing when it is not logged. The lambda picks the level, and the elapsed time is appended
to its message, such as Scan finished (42ms).
Stopwatch that logs the elapsed time when it is disposed, such as with
usingor by adding it to the extension's subscriptions.The lambda runs only on disposal, and only when the level it returns is enabled, so the message costs nothing when it is not logged. The lambda picks the level, and the elapsed time is appended to its message, such as
Scan finished (42ms).