]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/libjorte/getNtpTime.c
JORTE: update license headers and clean-up includes
[orte.git] / orte / libjorte / getNtpTime.c
index ac1c80245410b8d8e862751261482863da59d49d..fcbf8b1ee5a6c2d89e7c8df4a62a37ceb4d7a379 100644 (file)
@@ -7,6 +7,7 @@
   * (by command 'javah -jni class_with_native_function')
   *
   * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
+  * @author Martin Vajnar (martin.vajnar@gmail.com)
   * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
   * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
   * @author dedication to Kj
@@ -25,8 +26,7 @@
   *
   */
 
-#include  "jorte/jorte_protos_api.h"
-
+#include  "jorte/jorte.h"
 
 NtpTime getNtpTime(JNIEnv *env, jobject obj)
 {
@@ -50,7 +50,7 @@ NtpTime getNtpTime(JNIEnv *env, jobject obj)
   fieldID = (*env)->GetFieldID(env,ntpTimeClass,"fraction","J");
 //  if(fieldID == NULL) return(NTPTIME_ZERO(time)); // NEFUNGUJE
   /* get object's value */
-  time.fraction = (uint32_t) (*env)->GetIntField(env,obj,fieldID);
+  time.fraction = (uint32_t) (*env)->GetLongField(env,obj,fieldID);
 
   return(time);