I don't know about a function, unless the function is doing something to time itself.... but, if you are on a UNIX box, you can get information about a process using 'ps'.
If you know the processID of the process your interested in....
ps -fp [processID]
If you don't know the processID, this will give a list of the processes returned by ps that contain the name of the process (program).....
ps -ef |grep nameOfProgram
note also, that if you are looking for the process for the program you are running, $$ contains the processID.
'hope this helps....
keep the rudder amid ship and beware the odd typo