Call getrusage() to return a struct containing some information.
getrusage(2): resource usage - Linux man page

Rummage through the /proc/PID/stat file to find yet more information.
proc(5): process info pseudo-file system - Linux man page