diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-22 22:58:56 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-22 22:58:56 +0000 |
| commit | 3c7a6abb7aa82f3b7c1d44db9520763469af415f (patch) | |
| tree | 5829746ffe6c2668b2a10efad8e2e85215708eb9 /sources/core/VSTask.java | |
| parent | 6f16d971c6ab18afd05e4b5b694ccf9944a0537c (diff) | |
A ProcessRecoverEvent should get handled the VERY first.
Dafault sim time now 15s.
New brainstorm.
Diffstat (limited to 'sources/core/VSTask.java')
| -rw-r--r-- | sources/core/VSTask.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java index 2687ec3..d92ca79 100644 --- a/sources/core/VSTask.java +++ b/sources/core/VSTask.java @@ -123,9 +123,23 @@ public class VSTask implements Comparable { else if (taskTime > task.getTaskTime()) return 1; + /* If it's a ProtocolRecover, it should get handled very first */ + boolean a = event instanceof ProcessRecoverEvent; + boolean b = task.getEvent() instanceof ProcessRecoverEvent; + + if (a && b) + return 0; + + if (a) + return -1; + + if (b) + return 1; + + /* If it's a ProtocolEvent, it should get handled first */ - boolean a = event instanceof ProtocolEvent; - boolean b = task.getEvent() instanceof ProtocolEvent; + a = event instanceof ProtocolEvent; + b = task.getEvent() instanceof ProtocolEvent; if (a && b) return 0; @@ -135,6 +149,7 @@ public class VSTask implements Comparable { if (b) return 1; + } return 0; |
