summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-flow/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-simulator/opendc-simulator-flow/src/main/java')
-rw-r--r--opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java b/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java
index 4d098043..ed5579ea 100644
--- a/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java
+++ b/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java
@@ -152,6 +152,15 @@ public final class FlowStage {
}
/**
+ * Synchronously update the {@link FlowStage} at the current timestamp.
+ */
+ public void sync() {
+ this.flags |= STAGE_INVALIDATE;
+ onUpdate(clock.millis());
+ engine.scheduleDelayed(this);
+ }
+
+ /**
* Close the {@link FlowStage} and disconnect all inlets and outlets.
*/
public void close() {