类 StopWatch


  • public class StopWatch
    extends Object
    Simple stop watch, allowing for timing of a number of tasks, exposing total running time and running time for each named task.

    Conceals use of System.currentTimeMillis(), improving the readability of application code and reducing the likelihood of calculation errors.

    Note that this object is not designed to be thread-safe and does not use synchronization.

    This class is normally used to verify performance during proof-of-concepts and in development, rather than as part of production applications.

    从以下版本开始:
    May 2, 2001
    作者:
    Rod Johnson, Juergen Hoeller, Sam Brannen