summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30c2d66)
raw | patch | inline | side by side (parent: 30c2d66)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 18 Feb 2009 22:39:57 +0000 (23:39 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 18 Feb 2009 22:39:57 +0000 (23:39 +0100) |
Java keeps time as milliseconds in 64bit integers. Let's keep it that
way and translate to epoch transparently.
The other way around, from C to Java, already multiplies by 1000.
way and translate to epoch transparently.
The other way around, from C to Java, already multiplies by 1000.
src/java.c | patch | blob | history |
diff --git a/src/java.c b/src/java.c
index 2d4974f2627d318f8986f62a99149631fc45ae88..488e18bd11d3dfd3343f2eaaaad4cf7784c93e25 100644 (file)
--- a/src/java.c
+++ b/src/java.c
ERROR ("java plugin: jtoc_value_list: jtoc_long (getTime) failed.");
return (-1);
}
- vl->time = (time_t) tmp_long;
+ /* Java measures time in milliseconds. */
+ vl->time = (time_t) (tmp_long / ((jlong) 1000));
status = jtoc_long (jvm_env, &tmp_long,
class_ptr, object_ptr, "getInterval");