X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=era.mi%2Fsrc%2Fera%2Fmi%2Flogic%2Ftimeline%2FTimeline.java;h=5c88deae9f254b6bc228f23c8f0be24c6e21c107;hb=7f37c7b2431309e49a0ee116d1ee6c173272e926;hp=125b69c3ff376cd4aa7a95dc9ae6669b32a395af;hpb=fa95c348b3b8fb9681e4bf5c8284c5ac8eeed518;p=Mograsim.git diff --git a/era.mi/src/era/mi/logic/timeline/Timeline.java b/era.mi/src/era/mi/logic/timeline/Timeline.java index 125b69c3..5c88deae 100644 --- a/era.mi/src/era/mi/logic/timeline/Timeline.java +++ b/era.mi/src/era/mi/logic/timeline/Timeline.java @@ -33,6 +33,12 @@ public class Timeline currentTime = first.getTiming(); first.run(); } + + public void executeAll() + { + while (hasNext()) + executeNext(); + } public long getSimulationTime() { @@ -85,5 +91,16 @@ public class Timeline function.handle(event); } + @Override + public String toString() + { + return event.toString(); + } + } + + @Override + public String toString() + { + return "simulation time: " + currentTime + ", " + events.toString(); } } \ No newline at end of file