FACT++  1.0
JNIEXPORT jlong JNICALL Java_dim_DimTimer_start ( JNIEnv *  env,
jclass  This,
jobject  aDimTimer,
jint  secs 
)

Definition at line 1031 of file dim_jni.c.

References dtq_start_timer(), Java_dim_DimTimer_stop(), and timer_callback().

Referenced by Java_dim_Client_infoService().

1032 {
1033  jobject callback_param;
1034  void (*callback_function)();
1035 
1036  if(This){}
1037  callback_param = (*env)->NewGlobalRef(env, aDimTimer);
1038  callback_function = &timer_callback; //TODO who should do the cleanup?
1039 
1040 //printf("Starting timer %d, %08x %08x\n", secs, (long)callback_param, aDimTimer);
1041  dtq_start_timer(secs, callback_function, callback_param);
1042 
1043  return (jlong)callback_param;
1044 }
void timer_callback(jobject *_aDimTimer)
Definition: dim_jni.c:903
void dtq_start_timer(int time, void(*user_routine)(), dim_long tag)
Definition: dtq.c:790

+ Here is the call graph for this function:

+ Here is the caller graph for this function: