/** * Start a stopwatch. * Time is accumulated if the stopwatch is already registered * * @param timePhaseName the name of this stopwatch * * @return The stopwatch */ public static TimedPhase startTiming(String timePhaseName) { RequestLog current = RLOG.get(); TimedPhase timePhase = current.times.get(timePhaseName); if (timePhase == null) { // If it was the first phase in general, create logging context as well if (current.info == null) { current.init(); } timePhase = new TimedPhase(timePhaseName); current.times.put(timePhaseName, timePhase); } current.mostRecentTimer = timePhase; return timePhase.start(); }