public class Stopwatch { private final long start; public Stopwatch() { start = System.currentTimeMillis(); } // return time (in seconds) since this object was created public double elapsedTime() { long now = System.currentTimeMillis(); return (now - start) / 1000.0; } }
Friday, April 19, 2013
Stop Watch Program - To measure the amount of time to process each input
Subscribe to:
Post Comments
(
Atom
)