Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix silly bug in msg process sleep bindings - Adrien
authoralebre <adrien.lebre@inria.fr>
Thu, 12 Sep 2013 15:13:31 +0000 (17:13 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 13 Sep 2013 15:16:02 +0000 (17:16 +0200)
src/bindings/java/jmsg_process.c

index 2f6216e..2edf528 100644 (file)
@@ -335,7 +335,7 @@ Java_org_simgrid_msg_Process_isSuspended(JNIEnv * env,
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cls, jlong jmillis, jint jnanos)
  {
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cls, jlong jmillis, jint jnanos)
  {
-  double time =  jmillis / 1000 + jnanos / 1000;
+  double time =  ((double)jmillis) / 1000 + ((double)jnanos) / 1000000000;
   msg_error_t rv;
   rv = MSG_process_sleep(time);
   if (rv != MSG_OK) {
   msg_error_t rv;
   rv = MSG_process_sleep(time);
   if (rv != MSG_OK) {