How to use Time(1) in linux

Hello,
I have this project where I need to time how long a certain process take based on the system clock(in seconds) and as well as in real time. I have been searching for weeks now and the deadline is approaching for the assignment. I have came across time() in Linux and it will give you the user, real, and system time,which is great but I don't know if the given time is just for that particular process and also I just want the real and system time but when calling such function it returns the three times automatically. With all of this in mind, Can anyone assist me with this problem(how to just time a given process and just receive the real and system time).Any advice will be appreciated!!

Thanks In Advance
Topic archived. No new replies allowed.