So what part of this do you need help with exactly? I assume you need to know how to get the current time at the beginning and end of your program. Is that correct? With a little bit of work, you can find help with such things by browsing
the Java API documentation. In particular, you can use
java.util.Date. Its default constructor initializes the Date object with the current time.
I guess you also need to find a way to subtract the beginning and ending time. Unfortunately, I haven't found anything yet, but if you browse through the above links, you might be able to find something that I'm missing.
Good luck!
Layne