AAI-1523 Batch reformat aai-core
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / logging / StopWatch.java
index e305062..0d93827 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.aai.logging;
 
 import org.onap.aai.logging.LoggingContext.LoggingField;
 
 public final class StopWatch {
 
-       private StopWatch() {}
-
-       public static void start() {
-               LoggingContext.stopWatchStart();
-       }
-
-       public static double stop() {
-               return LoggingContext.stopWatchStop();
-       }
-       public static void conditionalStart() {
-               if ( LoggingContext.isStopWatchStarted() ) {
-                       return;
-               }
-               start();
-       }
-       public static double stopIfStarted() {
-               if ( LoggingContext.isStopWatchStarted() ) {
-                       return (stop());
-               }
-               return (0);
-       }
-       public static void clear() {
-               LoggingContext.remove(LoggingField.STOP_WATCH_START.toString());
-               LoggingContext.remove(LoggingField.ELAPSED_TIME.toString());
-       }
+    private StopWatch() {
+    }
+
+    public static void start() {
+        LoggingContext.stopWatchStart();
+    }
+
+    public static double stop() {
+        return LoggingContext.stopWatchStop();
+    }
+
+    public static void conditionalStart() {
+        if (LoggingContext.isStopWatchStarted()) {
+            return;
+        }
+        start();
+    }
+
+    public static double stopIfStarted() {
+        if (LoggingContext.isStopWatchStarted()) {
+            return (stop());
+        }
+        return (0);
+    }
+
+    public static void clear() {
+        LoggingContext.remove(LoggingField.STOP_WATCH_START.toString());
+        LoggingContext.remove(LoggingField.ELAPSED_TIME.toString());
+    }
 }