Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f129bdd authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use @CriticalNative annotation on Process.getElapsedCpuTime()" into main

parents 3acf6f2a 58e641b8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import android.webkit.WebViewZygote;

import com.android.sdksandbox.flags.Flags;

import dalvik.annotation.optimization.CriticalNative;
import dalvik.system.VMDebug;
import dalvik.system.VMRuntime;

@@ -790,6 +791,7 @@ public class Process {
     * Returns elapsed milliseconds of the time this process has run.
     * @return  Returns the number of milliseconds this process has return.
     */
    @CriticalNative
    public static final native long getElapsedCpuTime();

    /**
+1 −1
Original line number Diff line number Diff line
@@ -1200,7 +1200,7 @@ void android_os_Process_sendTgSignalThrows(JNIEnv* env, jobject clazz, jint tgid
    }
}

static jlong android_os_Process_getElapsedCpuTime(JNIEnv* env, jobject clazz)
static jlong android_os_Process_getElapsedCpuTime(CRITICAL_JNI_PARAMS)
{
    struct timespec ts;