Yes, this is the basic idea, but it takes a bit more thinking to get meaningful measurements!
First of all, the system time is not too accurate, so for measuring "short" events it is not too useful - like making a move /supposedly its not done by an AI/. Maybe running them like 1000 times, and dividing the data by 1000 gives a more precise answer though!
I would suggest running your programs with a set sequence of steps made by the players, and measuring the total execution time. Also it is worth to do the measuring a couple of times, as the first execution is supposed to last much longer - homework is to find a reasoning for this

Finally if the main goal is to comapre c++ and java speed, it is also interesting to decide if you gonna use a direct (naive) port of your program on both platforms, or you might try to take advantage of the specifics of each environment.
I hope I havent raised more questions than answered ....
This post has been edited by 1lacca: 9 Sep, 2005 - 04:27 AM