summaryrefslogtreecommitdiff
path: root/src/sim/sim_events.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/sim_events.cc')
-rw-r--r--src/sim/sim_events.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sim/sim_events.cc b/src/sim/sim_events.cc
index b7901832d..d9e8bdeaa 100644
--- a/src/sim/sim_events.cc
+++ b/src/sim/sim_events.cc
@@ -78,6 +78,14 @@ exitSimLoop(const std::string &message, int exit_code)
exitSimLoop(curTick, message, exit_code);
}
+void
+CountedDrainEvent::process()
+{
+ if (--count == 0) {
+ exitSimLoop("Finished drain");
+ }
+}
+
//
// constructor: automatically schedules at specified time
//