通过C获取微秒
JNIEXPORT jlongArray JNICALL Java_com_test_ndkhelloword_MainActivity_getTimesFromJni(
JNIEnv *env, jobject thiz) {
jlongArray time = env->NewLongArray(2);
jlong temp[] = { 0, 0 };
struct timeval begin;
gettimeofday(&begin, NULL);
temp[0] = begin.tv_sec;
temp[1] = begin.tv_usec;
env->SetLongArrayRegion(time, 0, 2, temp);
return time;
}