[C#] Best way to time methods in editor, from a static class ?

Hello,

I would like to have a static class that I can call from my custom menu, to run some editor functions with a timer attached, so I can see how long it takes.

For example,
I want to run a lightmapping.bakeasync operation from my own custom menu and report the time it took to bake.

What is the most proper way to do this in a static class ?

Thanks

In the case of lightmapping.bakeasync. I can use the completed delegate to get this done. What if that callback didn’t exist, I’m looking for proper C sharp techniques to handle this case

Thanks