From 3c7a6abb7aa82f3b7c1d44db9520763469af415f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 22 May 2008 22:58:56 +0000 Subject: A ProcessRecoverEvent should get handled the VERY first. Dafault sim time now 15s. New brainstorm. --- sources/core/VSTask.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'sources/core/VSTask.java') 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; -- cgit v1.2.3