Is there a stopwatch in Java?

You’ll find one in

http://commons.apache.org/lang/

It’s called

org.apache.commons.lang.time.StopWatch

But it roughly does the same as yours. If you’re in for more precision, use

System.nanoTime()

Leave a Comment