Apps that model business workflows often have to rely on timed notifications. This example is a stateless session bean that shows how to set a timer. To create a timer, one of the createTimer methods ...
If you want to time a segment of code you may do the following. Instantiating Timer is equivalent to Timer.start(). Timer t = new Timer(); String val = searchForStuff(); System.out.println("It took " ...