summaryrefslogtreecommitdiff
path: root/base/android/time_utils.cc
blob: 632dfb7a4e0de7700aceb86494813bbedf393f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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 <stdint.h>

#include "base/time/time.h"
#include "jni/TimeUtils_jni.h"

namespace base {
namespace android {

static jlong JNI_TimeUtils_GetTimeTicksNowUs(
    JNIEnv* env,
    const JavaParamRef<jclass>& clazz) {
  return (TimeTicks::Now() - TimeTicks()).InMicroseconds();
}

}  // namespace android
}  // namespace base