Timesync: Make sure timesync event is setup after curTick is unserialized
Setup initial timesync event in initState or loadState so that curTick has been updated to the new value, otherwise the event is scheduled in the past.
This commit is contained in:
@@ -108,7 +108,18 @@ Root::Root(RootParams *p) : SimObject(p), _enabled(false),
|
||||
assert(_root == NULL);
|
||||
_root = this;
|
||||
lastTime.setTimer();
|
||||
timeSyncEnable(p->time_sync_enable);
|
||||
}
|
||||
|
||||
void
|
||||
Root::initState()
|
||||
{
|
||||
timeSyncEnable(params()->time_sync_enable);
|
||||
}
|
||||
|
||||
void
|
||||
Root::loadState(Checkpoint *cp)
|
||||
{
|
||||
timeSyncEnable(params()->time_sync_enable);
|
||||
}
|
||||
|
||||
Root *
|
||||
|
||||
Reference in New Issue
Block a user