@@ -0,0 +1,1532 @@
+/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0A    http://www.apache.org/licenses/LICENSE-2.0%0A%0AUnless required by applicable law or agreed to in writing, software%0Adistributed under the License is distributed on an %22AS IS%22 BASIS,%0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0ASee the License for the specific language governing permissions and%0Alimitations under the License.%0A==============================================================================*/%0A%0Apackage org.tensorflow.demo.env;%0A%0Aimport android.os.SystemClock;%0A%0A/**%0A * A simple utility timer for measuring CPU time and wall-clock splits.%0A */%0Apublic class SplitTimer %7B%0A  private final Logger logger;%0A%0A  private long lastWallTime;%0A  private long lastCpuTime;%0A%0A  public SplitTimer(final String name) %7B%0A    logger = new Logger(name);%0A    newSplit();%0A  %7D%0A%0A  public void newSplit() %7B%0A    lastWallTime = SystemClock.uptimeMillis();%0A    lastCpuTime = SystemClock.currentThreadTimeMillis();%0A  %7D%0A%0A  public void endSplit(final String splitName) %7B%0A    final long currWallTime = SystemClock.uptimeMillis();%0A    final long currCpuTime = SystemClock.currentThreadTimeMillis();%0A%0A    logger.i(%0A        %22%25s: cpu=%25dms wall=%25dms%22,%0A        splitName, currCpuTime - lastCpuTime, currWallTime - lastWallTime);%0A%0A    lastWallTime = currWallTime;%0A    lastCpuTime = currCpuTime;%0A  %7D%0A%7D%0A

add Timer utility class for measuring cpu and wall time. Change: 143498460