JNI调用C计算代码执行时间(毫秒)

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "caltime_Jni.h"
JNIEXPORT jlong JNICALL Java_caltime_Jni_calculateTime
(JNIEnv *e, jobject jo){
long start, end;

int i,j,k;
long a;
//start time
start = clock();
//do something
for (i = 0; i < 14400000; i++) 
{
a = 255.0 / 16.0;

}
//end time
end = clock();

return end - start;
}
JNIEXPORT jstring JNICALL Java_caltime_Jni_printStr
(JNIEnv *e, jobject j) {
return (*e)->NewStringUTF(e, "Rambow");
}