add lots of java APIs needed for Whatsapp

This commit is contained in:
Julian Winkler
2024-06-15 22:32:01 +02:00
parent b81f53e4b2
commit bb50bbfa91
61 changed files with 383 additions and 71 deletions

View File

@@ -17,3 +17,10 @@ JNIEXPORT jlong JNICALL Java_android_os_SystemClock_uptimeMillis(JNIEnv *env, jc
clock_gettime(CLOCK_MONOTONIC, &now);
return now.tv_sec * 1000 + lround(now.tv_nsec / 1e6);
}
JNIEXPORT jlong JNICALL Java_android_os_SystemClock_elapsedRealtimeNanos(JNIEnv *env, jclass this)
{
struct timespec t;
clock_gettime(CLOCK_BOOTTIME, &t);
return t.tv_sec * 1000000000 + t.tv_nsec;
}