This worked for me on macOS 11. Since I don't know what p in your question is, I used the time command for testing:
Created a shell script named /var/tmp/python and made it an executable (chmod +x /var/tmp/python):
#!/bin/sh
time /usr/bin/python3 "$@"
The "$@" is used to pass all command line arguments passed to /var/tmp/python to the actual /usr/bin/python3.
Then I added a new System Interpreter in PyCharm and picked /var/tmp/python as the executable.
When I debug my "Hello world" application this is the output:
/var/tmp/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 53332 --file "/var/tmp/hello_world.py"
Connected to pydev debugger (build 212.5457.59)
Hello, world!
real 0m3.091s
user 0m0.292s
sys 0m0.078s
Process finished with exit code 0
as you can see in addition to executing/debugging the application it also printed the total time passed.
p pythona batch file/shell script and adding that script to PyCharm as a new Python interpreter.