| Index: base/android/time_utils.cc
|
| diff --git a/base/android/time_utils.cc b/base/android/time_utils.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b5a8ed13131b0bf4b017c6834c50b7dea79c11d4
|
| --- /dev/null
|
| +++ b/base/android/time_utils.cc
|
| @@ -0,0 +1,24 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/android/time_utils.h"
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include "base/time/time.h"
|
| +#include "jni/TimeUtils_jni.h"
|
| +
|
| +namespace base {
|
| +namespace android {
|
| +
|
| +static jlong GetTimeTicksNowUs(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
|
| + return (TimeTicks::Now() - TimeTicks()).InMicroseconds();
|
| +}
|
| +
|
| +bool RegisterTimeUtils(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| +} // namespace android
|
| +} // namespace base
|
|
|