Class StopWatchUtils

java.lang.Object
ubic.gemma.core.profiling.StopWatchUtils

public class StopWatchUtils extends Object
Utilities for working with StopWatch.
Author:
poirigui
  • Constructor Details

    • StopWatchUtils

      public StopWatchUtils()
  • Method Details

    • measuredRegion

      public static StopWatchUtils.StopWatchRegion measuredRegion(org.apache.commons.lang3.time.StopWatch stopWatch)
      Create a measured region by a StopWatch, which can be used with a try-with-resource statement to StopWatch.start() and StopWatch.suspend() when entering and leaving the region. If the stop watch is suspended, let's say from a previous call to this function, it will be resumed, allowing for a cumulative measurement of time usage. This is really handy to measure code regions and report time usage.
    • getMinutesElapsed

      public static String getMinutesElapsed(org.apache.commons.lang3.time.StopWatch overallWatch)