Commit ce9bdc60 authored by rodrigo.calheiros's avatar rodrigo.calheiros

Issue #8: CloudSim.terminateSimulation(long time) changed to…

Issue #8: CloudSim.terminateSimulation(long time) changed to CloudSim.terminateSimulation(double time),
to comply with clock field of CloudSim class.
parent d4f7bbbe
......@@ -61,7 +61,7 @@ public class CloudSim {
private static Calendar calendar = null;
/** The termination time. */
private static long terminateAt = -1;
private static double terminateAt = -1;
/**
* Initialises all the common attributes.
......@@ -212,7 +212,7 @@ public class CloudSim {
* @return true, if successful
* otherwise.
*/
public static boolean terminateSimulation(long time) {
public static boolean terminateSimulation(double time) {
if (time <= clock) {
return false;
} else {
......@@ -863,7 +863,7 @@ public class CloudSim {
}
//this block allows termination of simulation at a specific time
if (terminateAt != -1 && clock >= terminateAt) {
if (terminateAt > 0.0 && clock >= terminateAt) {
terminateSimulation();
clock = terminateAt;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment