What's the best way to get the total time since the start of the current frame?

As title. basically i want to know how much time has passed since this frame started processing, while we are still in this frame.

Real time could be used by storing the value of realtime at the beginning of the frame. The subtract it from realtime when you need to check it.

A StopWatch would also work. Manipulate your script execution order so it starts at the beginning of each frame. Then you can check it while you are running.