Run a process this way:
time scriptname # or
It will report the sum of children plus parent
As soon as you add the word daemon, the picture changes.
top will show the approximate value,
top -p [pid] You can also read /proc[pid]/stat.utime and friends (utime, stime, cutime, cstime (children start with c) ) with C or perl or python. Generally, once you get used to this data, you may discover that system time and user time become as important as total cpu time for performance evaluation.
ps -p [pid] -o %cpu is not very informative - it just shows current amounts of cpu being used, not accumulated time.