Commit cd5965d7 authored by caminha's avatar caminha
Browse files

fixed consumer start time

parent d541498a
......@@ -61,7 +61,7 @@ namespace ndn
consumerHelper.SetAttribute("Prefix", StringValue(intermediateName));
Ptr<Application> app = consumerHelper.Install(consumers.Get(c)).Get(0);
Time starttime = MilliSeconds(rng->GetInteger(300+20*rsic, 320+20*rsic-1));
Time starttime = MilliSeconds(rng->GetInteger(300+70*rsic, 320+70*rsic));
app->SetStartTime(starttime);
app->SetStopTime(consumerStopTime);
......@@ -93,12 +93,13 @@ namespace ndn
for (uint c=0; c<consumers.GetN(); c++)
{
Time subInterval = Minutes(std::pow(2, rng->GetInteger(0, subscriptionIntervalCount-1)));
uint rsic = rng->GetInteger(0, subscriptionIntervalCount-1);
Time subInterval = Minutes(std::pow(2, rsic));
consumerHelper.SetAttribute("SubscriptionInterval", TimeValue(subInterval));
Ptr<Application> app = consumerHelper.Install(consumers.Get(c)).Get(0);
Time starttime = MilliSeconds(rng->GetInteger(301, 400));
Time starttime = MilliSeconds(rng->GetInteger(300+70*rsic, 320+70*rsic));
app->SetStartTime(starttime);
app->SetStopTime(consumerStopTime);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment