I've included the source code for a Stopwatch class here so I won't lose it. It's a good class for benchmarking the performance of certain operations in your code.
I think I found the Java Stopwatch class (shown below) in a book named Java Platform Performance. You can use the class for general performance timings, or make it part of an overall benchmarking system.
I take no credit for this Java code -- I didn't write it, and at the moment I can't find that book -- but I found it on my laptop, and wanted to make sure I have a copy of it laying around for when I need it.