conf: Make event intervals configurable
User can specify the intervals for the first Hello Interest,
AdjLsa building, and routing calculation in the conf file.
refs: #2071
Change-Id: Ic8eb29d433069086955178bc42b5f8fc8f4149d3
diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index cefaa29..1af254e 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -155,7 +155,7 @@
_LOG_DEBUG("Scheduling scheduledAdjLsaBuild");
m_nlsr.setIsBuildAdjLsaSheduled(true);
// event here
- m_scheduler.scheduleEvent(ndn::time::seconds(5),
+ m_scheduler.scheduleEvent(m_adjLsaBuildInterval,
ndn::bind(&Lsdb::scheduledAdjLsaBuild, &m_nlsr.getLsdb()));
}
}
@@ -200,7 +200,7 @@
_LOG_DEBUG("Scheduling scheduledAdjLsaBuild");
m_nlsr.setIsBuildAdjLsaSheduled(true);
// event here
- m_scheduler.scheduleEvent(ndn::time::seconds(5),
+ m_scheduler.scheduleEvent(m_adjLsaBuildInterval,
ndn::bind(&Lsdb::scheduledAdjLsaBuild, &m_nlsr.getLsdb()));
}
}
@@ -285,7 +285,7 @@
_LOG_DEBUG("Scheduling scheduledAdjLsaBuild");
m_nlsr.setIsBuildAdjLsaSheduled(true);
// event here
- m_scheduler.scheduleEvent(ndn::time::seconds(5),
+ m_scheduler.scheduleEvent(m_adjLsaBuildInterval,
ndn::bind(&Lsdb::scheduledAdjLsaBuild, &m_nlsr.getLsdb()));
}
}