Package de.hybris.platform.util
Class StopWatch
java.lang.Object
de.hybris.platform.util.StopWatch
Simple timer implementation.
To count the time, a certain process runs, stop it's execution time as follows:
To count the time, a certain process runs, stop it's execution time as follows:
StopWatch timer = new StopWatch("Stopping my process");
// run your process
long elapsedTime = timer.stop();
// elapsedTime now contains the time, your process run. You may print it to a logger instance
log.info("process took " + elapsedTime / 1000 + " seconds");
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StopWatch
- Parameters:
text- An optional name for this StopWatch instance
-
-
Method Details
-
stop
public long stop()Method stop -
stop
-
pause
public void pause() -
restart
public void restart()
-