summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-17 22:41:35 +0000
committerPaul Buetow <paul@buetow.org>2008-05-17 22:41:35 +0000
commit18c6746750cb0c4f5cef6d7ed661e85dab100683 (patch)
treea014e7d509f2b7a24a04fd2f8212529ce4d1326a /sources
parent8602c18db94281afd5bc0ceb5930a3d99fbe7a38 (diff)
Bugfix: Crash and Recover tasks use global time.
Diffstat (limited to 'sources')
-rw-r--r--sources/core/VSProcess.java8
-rw-r--r--sources/core/VSTask.java4
-rw-r--r--sources/simulator/VSSimulationPanel.java4
3 files changed, 6 insertions, 10 deletions
diff --git a/sources/core/VSProcess.java b/sources/core/VSProcess.java
index d9fd0c5..bef1f58 100644
--- a/sources/core/VSProcess.java
+++ b/sources/core/VSProcess.java
@@ -297,10 +297,6 @@ public final class VSProcess extends VSPrefs {
return isCrashed;
}
- public synchronized boolean hasCrashed() {
- return hasCrashed;
- }
-
public synchronized void isCrashed(boolean isCrashed) {
this.isCrashed = isCrashed;
crashHistory.add(new Long(globalTime));
@@ -308,6 +304,10 @@ public final class VSProcess extends VSPrefs {
hasCrashed = true;
}
+ public synchronized boolean hasCrashed() {
+ return hasCrashed;
+ }
+
public synchronized Color getCrashedColor() {
return crashedColor;
}
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index 4fe7b37..7ebf4d5 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -54,10 +54,6 @@ public class VSTask implements Comparable {
}
public void run() {
- /* Process crash allready checked in VSTaskManager */
- //if (process.isCrashed() && !(event instanceof ProcessRecoverEvent))
- // return;
-
if (event instanceof VSMessage) {
onMessageRecv();
diff --git a/sources/simulator/VSSimulationPanel.java b/sources/simulator/VSSimulationPanel.java
index 8d792a9..ede5d3b 100644
--- a/sources/simulator/VSSimulationPanel.java
+++ b/sources/simulator/VSSimulationPanel.java
@@ -634,12 +634,12 @@ public class VSSimulationPanel extends JPanel implements Runnable, MouseMotionLi
} else if (actionCommand.equals(prefs.getString("lang.crash"))) {
VSProcessEvent event = new ProcessCrashEvent();
event.init(process);
- taskManager.addTask(new VSTask(process.getTime(), process, event));
+ taskManager.addTask(new VSTask(process.getGlobalTime(), process, event));
} else if (actionCommand.equals(prefs.getString("lang.recover"))) {
VSProcessEvent event = new ProcessRecoverEvent();
event.init(process);
- taskManager.addTask(new VSTask(process.getTime(), process, event));
+ taskManager.addTask(new VSTask(process.getGlobalTime(), process, event));
}
}
};