All Downloads are FREE. Search and download functionalities are using the official Maven repository.

timer.MicroTimer.cc Maven / Gradle / Ivy

Go to download

ProActive Programming is a Java API that provides a powerful framework to easily develop parallel and distributed applications

The newest version!
#include "jni.h"
#include "MicroTimer.h"
#include 
#include 
JNIEXPORT jlongArray JNICALL Java_org_objectweb_proactive_core_util_timer_MicroTimer_currentTime  (JNIEnv* env, jobject obj)
{
    struct timeval current; 
    struct timezone currentTZ;
    jsize size=2;
  
    jlongArray tablo = env->NewLongArray(size);
    jlong* localArray = env->GetLongArrayElements(tablo, NULL);
   
    gettimeofday(¤t, ¤tTZ); 
    localArray[0]=current.tv_sec;
    localArray[1]=current.tv_usec;
    // printf("Puting \n");
    env->ReleaseLongArrayElements(tablo, localArray, 0);
    return tablo;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy