How to get wall time from cProfile?
14:24 15 Apr 2026

I'm using cProfile, and want to find the wall-clock time spent in a specific function, as well as across the entire program. I notice in Using a custom timer it says

... to force use of wall-clock time or elapsed process time ...

which suggests to me it's not necessarily providing the wall time. How do I get the wall time? Are values like tottime wall time?

In case it's relevant, I'm using python3 -m cProfile, as my code is autogenerated.

python profile