1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.chrome.browser;
7 import org.chromium.base.CalledByNative;
10 * Utilities to support startup metrics - Android version.
12 public class UmaUtils {
14 private static long sApplicationStartWallClockMs;
17 * Record the time at which the activity started. This should be called asap after
18 * the start of the activity's onCreate function.
20 public static void recordMainEntryPointTime() {
21 // We can't simply pass this down through a JNI call, since the JNI for chrome
22 // isn't initialized until we start the native content browser component, and we
23 // then need the start time in the C++ side before we return to Java. As such we
24 // save it in a static that the C++ can fetch once it has initialized the JNI.
25 sApplicationStartWallClockMs = System.currentTimeMillis();
29 private static long getMainEntryPointTime() {
30 return sApplicationStartWallClockMs;