]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/java/src/org/ocera/orte/types/NtpTime.java
JORTE: fraction computation
[orte.git] / orte / java / src / org / ocera / orte / types / NtpTime.java
index d5e34708338bd6b4259ab1ef561869586b8dcef6..89e36907cb37421ede943c5f3d0b608c7d727b30 100644 (file)
@@ -85,9 +85,9 @@ public class NtpTime {
    * Get NtpTime in its decimal form.
    * @return actual NtpTime's value
    **/
-  public long getDecimal()
+  public double getDecimal()
   {
-    return this.seconds + (this.fraction << 32);
+    return this.seconds + (double)this.fraction / ((long)1 << 32);
   }
     
   /* ****************************************************************** *
@@ -117,4 +117,4 @@ public class NtpTime {
    public static native
    String NtpTimeToStringUs(NtpTime time);
    
-}
\ No newline at end of file
+}