in reply to Question about time module

times() might be of some use too..., maybe in combination with ikegamis proposal? (taken from: perldoc -f times)
times   Returns a four-element list giving the user and system times, in seconds, for this process and the children of this process.

                   ($user,$system,$cuser,$csystem) = times;

               In scalar context, "times" returns $user.