Stopwatch in java

import org.apache.commons.lang.time.StopWatch;

StopWatch clock = new StopWatch();
clock.start();
for( int i = 0; i < 100000000; i++ ) {
Math.sin( 0.34 );
}
clock.stop();
System.out.println( "It took" + clock.getTime() +
" milliseconds" );

Comments