summaryrefslogtreecommitdiff
path: root/src/sim/root.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/root.cc')
-rw-r--r--src/sim/root.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/root.cc b/src/sim/root.cc
index 752632b5e..f4aabad2e 100644
--- a/src/sim/root.cc
+++ b/src/sim/root.cc
@@ -104,8 +104,9 @@ Root::timeSyncSpinThreshold(Time newThreshold)
timeSyncEnable(en);
}
-Root::Root(RootParams *p) : SimObject(p), _enabled(false),
- _periodTick(p->time_sync_period), syncEvent(this)
+Root::Root(RootParams *p)
+ : SimObject(p), _enabled(false), _periodTick(p->time_sync_period),
+ syncEvent([this]{ timeSync(); }, name())
{
_period.setTick(p->time_sync_period);
_spinThreshold.setTick(p->time_sync_spin_threshold);