diff --git a/doc/manual/source/attributes.rst b/doc/manual/source/attributes.rst index a62c9f798..4e68f3408 100644 --- a/doc/manual/source/attributes.rst +++ b/doc/manual/source/attributes.rst @@ -893,7 +893,7 @@ in the ``my-mobility.cc`` implementation file:: .AddAttribute("Time", "Change current direction and speed after moving for this delay.", // etc (more parameters). - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&MyMobility::m_modeTime), MakeTimeChecker()) ; diff --git a/doc/manual/source/python.rst b/doc/manual/source/python.rst index 158005dfa..1df8cccd7 100644 --- a/doc/manual/source/python.rst +++ b/doc/manual/source/python.rst @@ -76,18 +76,18 @@ Here is some example code that is written in Python and that runs |ns3|, which i echoServer = ns.UdpEchoServerHelper(9) serverApps = echoServer.Install(nodes.Get(1)) - serverApps.Start(ns.Seconds(1.0)) - serverApps.Stop(ns.Seconds(10.0)) + serverApps.Start(ns.Seconds(1)) + serverApps.Stop(ns.Seconds(10)) address = interfaces.GetAddress(1).ConvertTo() echoClient = ns.UdpEchoClientHelper(address, 9) echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1)) - echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0))) + echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1))) echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024)) clientApps = echoClient.Install(nodes.Get(0)) - clientApps.Start(ns.Seconds(2.0)) - clientApps.Stop(ns.Seconds(10.0)) + clientApps.Start(ns.Seconds(2)) + clientApps.Stop(ns.Seconds(10)) ns.Simulator.Run() ns.Simulator.Destroy() @@ -266,17 +266,17 @@ After installing it, you can start using ns-3 right away. For example, using the echoServer = ns.UdpEchoServerHelper(9) serverApps = echoServer.Install(csmaNodes.Get(0)) - serverApps.Start(ns.Seconds(1.0)) - serverApps.Stop(ns.Seconds(10.0)) + serverApps.Start(ns.Seconds(1)) + serverApps.Stop(ns.Seconds(10)) echoClient = ns.UdpEchoClientHelper(csmaInterfaces.GetAddress(0).ConvertTo(), 9) echoClient.SetAttribute("MaxPackets", ns.UintegerValue(10)) - echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0))) + echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1))) echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024)) clientApps = echoClient.Install(csmaNodes.Get(1)) - clientApps.Start(ns.Seconds(2.0)) - clientApps.Stop(ns.Seconds(10.0)) + clientApps.Start(ns.Seconds(2)) + clientApps.Stop(ns.Seconds(10)) # Populate routing tables ns.Ipv4GlobalRoutingHelper.PopulateRoutingTables() diff --git a/doc/tutorial/source/building-topologies.rst b/doc/tutorial/source/building-topologies.rst index d67fa726c..5d590d26d 100644 --- a/doc/tutorial/source/building-topologies.rst +++ b/doc/tutorial/source/building-topologies.rst @@ -245,8 +245,8 @@ the constructor. UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); Recall that the ``csmaNodes NodeContainer`` contains one of the nodes created for the point-to-point network and ``nCsma`` "extra" nodes. @@ -269,12 +269,12 @@ leftmost point-to-point node seen in the topology illustration. UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(p2pNodes.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); Since we have actually built an internetwork here, we need some form of internetwork routing. |ns3| provides what we call global routing to @@ -1150,8 +1150,8 @@ start of the file. We have done this before. UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); And we put the echo client on the last STA node we created, pointing it to the server on the CSMA network. We have also seen similar operations before. @@ -1160,13 +1160,13 @@ the server on the CSMA network. We have also seen similar operations before. UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(wifiStaNodes.Get(nWifi - 1)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); Since we have built an internetwork here, we need to enable internetwork routing just as we did in the ``second.cc`` example script. @@ -1186,7 +1186,7 @@ loop. :: - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); We create just enough tracing to cover all three networks: diff --git a/doc/tutorial/source/conceptual-overview.rst b/doc/tutorial/source/conceptual-overview.rst index dd5dbcc68..eb523c879 100644 --- a/doc/tutorial/source/conceptual-overview.rst +++ b/doc/tutorial/source/conceptual-overview.rst @@ -554,8 +554,8 @@ created. UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(nodes.Get(1)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); The first line of code in the above snippet declares the ``UdpEchoServerHelper``. As usual, this isn't the application itself, it @@ -600,8 +600,8 @@ converted for you. The two lines, :: - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); will cause the echo server application to ``Start`` (enable itself) at one second into the simulation and to ``Stop`` (disable itself) at ten seconds @@ -620,12 +620,12 @@ that is managed by an ``UdpEchoClientHelper``. UdpEchoClientHelper echoClient(interfaces.GetAddress(1), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(nodes.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); For the echo client, however, we need to set five different ``Attributes``. The first two ``Attributes`` are set during construction of the @@ -668,11 +668,11 @@ When we previously called the methods, :: - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); ... - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); we actually scheduled events in the simulator at 1.0 seconds, 2.0 seconds and two events at 10.0 seconds. When ``Simulator::Run`` is called, the system @@ -758,7 +758,7 @@ in the first example program will schedule an explicit stop at 11 seconds: :: - + Simulator::Stop(Seconds(11.0)); + + Simulator::Stop(Seconds(11)); Simulator::Run(); Simulator::Destroy(); return 0; diff --git a/doc/tutorial/source/tracing.rst b/doc/tutorial/source/tracing.rst index bda23e2fa..44184cd92 100644 --- a/doc/tutorial/source/tracing.rst +++ b/doc/tutorial/source/tracing.rst @@ -1518,8 +1518,8 @@ The most common way to start pumping events is to start an (hopefully) familiar lines of an |ns3| script:: ApplicationContainer apps = ... - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); The application container code (see ``src/network/helper/application-container.h`` if you are interested) diff --git a/examples/channel-models/three-gpp-v2v-channel-example.cc b/examples/channel-models/three-gpp-v2v-channel-example.cc index 0c211c683..61d205391 100644 --- a/examples/channel-models/three-gpp-v2v-channel-example.cc +++ b/examples/channel-models/three-gpp-v2v-channel-example.cc @@ -264,7 +264,7 @@ main(int argc, char* argv[]) nextWaypoint += Seconds((maxAxisX - streetWidth) / 2 / vTx); txMob->GetObject()->AddWaypoint( Waypoint(nextWaypoint, Vector(0.0, maxAxisY / 2 - streetWidth / 2, 1.5))); - nextWaypoint = Seconds(0.0); + nextWaypoint = Seconds(0); rxMob->GetObject()->AddWaypoint( Waypoint(nextWaypoint, Vector(maxAxisX / 2 - streetWidth / 2, 0.0, 1.5))); nextWaypoint += Seconds(maxAxisY / vRx); diff --git a/examples/energy/energy-model-example.cc b/examples/energy/energy-model-example.cc index 90ca58e9b..b85da3f7b 100644 --- a/examples/energy/energy-model-example.cc +++ b/examples/energy/energy-model-example.cc @@ -275,7 +275,7 @@ main(int argc, char* argv[]) numPackets, interPacketInterval); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); for (auto iter = deviceModels.Begin(); iter != deviceModels.End(); iter++) diff --git a/examples/energy/energy-model-with-harvesting-example.cc b/examples/energy/energy-model-with-harvesting-example.cc index 9153b3b65..2b787da93 100644 --- a/examples/energy/energy-model-with-harvesting-example.cc +++ b/examples/energy/energy-model-with-harvesting-example.cc @@ -340,7 +340,7 @@ main(int argc, char* argv[]) numPackets, interPacketInterval); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); for (auto iter = deviceModels.Begin(); iter != deviceModels.End(); iter++) diff --git a/examples/error-model/simple-error-model.cc b/examples/error-model/simple-error-model.cc index c60e358bd..520552dc8 100644 --- a/examples/error-model/simple-error-model.cc +++ b/examples/error-model/simple-error-model.cc @@ -112,27 +112,27 @@ main(int argc, char* argv[]) Address(InetSocketAddress(i3i2.GetAddress(1), port))); onoff.SetConstantRate(DataRate("448kb/s")); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(c.Get(2)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a similar flow from n3 to n1, starting at time 1.1 seconds onoff.SetAttribute("Remote", AddressValue(InetSocketAddress(i1i2.GetAddress(0), port))); apps = onoff.Install(c.Get(3)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets sink.SetAttribute("Local", AddressValue(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(c.Get(1)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); // // Error model diff --git a/examples/ipv6/fragmentation-ipv6-PMTU.cc b/examples/ipv6/fragmentation-ipv6-PMTU.cc index 342deb27f..ca2ab884c 100644 --- a/examples/ipv6/fragmentation-ipv6-PMTU.cc +++ b/examples/ipv6/fragmentation-ipv6-PMTU.cc @@ -114,8 +114,8 @@ main(int argc, char** argv) // Create an UDP Echo server on n2 UdpEchoServerHelper echoServer(42); ApplicationContainer serverApps = echoServer.Install(n2); - serverApps.Start(Seconds(0.0)); - serverApps.Stop(Seconds(30.0)); + serverApps.Start(Seconds(0)); + serverApps.Stop(Seconds(30)); uint32_t maxPacketCount = 5; @@ -125,16 +125,16 @@ main(int argc, char** argv) echoClient.SetAttribute("PacketSize", UintegerValue(packetSizeN1)); echoClient.SetAttribute("MaxPackets", UintegerValue(maxPacketCount)); ApplicationContainer clientAppsN1 = echoClient.Install(n1); - clientAppsN1.Start(Seconds(2.0)); - clientAppsN1.Stop(Seconds(10.0)); + clientAppsN1.Start(Seconds(2)); + clientAppsN1.Stop(Seconds(10)); // Create an UDP Echo client on n0 to send UDP packets to n2 via r0 and r1 uint32_t packetSizeN2 = 4000; // Packet should fragment as intermediate link MTU is 1500 echoClient.SetAttribute("PacketSize", UintegerValue(packetSizeN2)); echoClient.SetAttribute("MaxPackets", UintegerValue(maxPacketCount)); ApplicationContainer clientAppsN2 = echoClient.Install(n1); - clientAppsN2.Start(Seconds(11.0)); - clientAppsN2.Stop(Seconds(20.0)); + clientAppsN2.Start(Seconds(11)); + clientAppsN2.Stop(Seconds(20)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("fragmentation-ipv6-PMTU.tr")); diff --git a/examples/ipv6/fragmentation-ipv6-two-MTU.cc b/examples/ipv6/fragmentation-ipv6-two-MTU.cc index 1bf149f04..b9bdb55ed 100644 --- a/examples/ipv6/fragmentation-ipv6-two-MTU.cc +++ b/examples/ipv6/fragmentation-ipv6-two-MTU.cc @@ -94,13 +94,13 @@ main(int argc, char** argv) echoClient.SetAttribute("PacketSize", UintegerValue(packetSize)); echoClient.SetAttribute("MaxPackets", UintegerValue(maxPacketCount)); ApplicationContainer clientApps = echoClient.Install(net1.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(20.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(20)); UdpEchoServerHelper echoServer(42); ApplicationContainer serverApps = echoServer.Install(net2.Get(1)); - serverApps.Start(Seconds(0.0)); - serverApps.Stop(Seconds(30.0)); + serverApps.Start(Seconds(0)); + serverApps.Stop(Seconds(30)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("fragmentation-ipv6-two-mtu.tr")); diff --git a/examples/ipv6/fragmentation-ipv6.cc b/examples/ipv6/fragmentation-ipv6.cc index ab622c86e..50b556fb3 100644 --- a/examples/ipv6/fragmentation-ipv6.cc +++ b/examples/ipv6/fragmentation-ipv6.cc @@ -91,13 +91,13 @@ main(int argc, char** argv) echoClient.SetAttribute("PacketSize", UintegerValue(packetSize)); echoClient.SetAttribute("MaxPackets", UintegerValue(maxPacketCount)); ApplicationContainer clientApps = echoClient.Install(net1.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(20.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(20)); UdpEchoServerHelper echoServer(42); ApplicationContainer serverApps = echoServer.Install(net2.Get(1)); - serverApps.Start(Seconds(0.0)); - serverApps.Stop(Seconds(30.0)); + serverApps.Start(Seconds(0)); + serverApps.Stop(Seconds(30)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("fragmentation-ipv6.tr")); diff --git a/examples/ipv6/icmpv6-redirect.cc b/examples/ipv6/icmpv6-redirect.cc index f74826731..2ef33f6a1 100644 --- a/examples/ipv6/icmpv6-redirect.cc +++ b/examples/ipv6/icmpv6-redirect.cc @@ -103,8 +103,8 @@ main(int argc, char** argv) iic1.GetInterfaceIndex(1)); Ptr routingStream = Create(&std::cout); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(0.0), r1, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(3.0), sta1, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(0), r1, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(3), sta1, routingStream); NS_LOG_INFO("Create Applications."); uint32_t packetSize = 1024; @@ -114,8 +114,8 @@ main(int argc, char** argv) ping.SetAttribute("Count", UintegerValue(maxPacketCount)); ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(sta1); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("icmpv6-redirect.tr")); diff --git a/examples/ipv6/loose-routing-ipv6.cc b/examples/ipv6/loose-routing-ipv6.cc index 4fbe1ffc2..a593bed4f 100644 --- a/examples/ipv6/loose-routing-ipv6.cc +++ b/examples/ipv6/loose-routing-ipv6.cc @@ -146,7 +146,7 @@ main(int argc, char** argv) */ uint32_t packetSize = 1024; uint32_t maxPacketCount = 1; - Time interPacketInterval = Seconds(1.0); + Time interPacketInterval = Seconds(1); std::vector routersAddress; routersAddress.push_back(i3.GetAddress(1, 1)); @@ -163,8 +163,8 @@ main(int argc, char** argv) ApplicationContainer apps = client.Install(h0); DynamicCast(apps.Get(0))->SetRouters(routersAddress); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(20)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("loose-routing-ipv6.tr")); diff --git a/examples/ipv6/ping6-example.cc b/examples/ipv6/ping6-example.cc index 0a7d86141..d2ca9c813 100644 --- a/examples/ipv6/ping6-example.cc +++ b/examples/ipv6/ping6-example.cc @@ -85,8 +85,8 @@ main(int argc, char** argv) ping.SetAttribute("InterfaceAddress", AddressValue(i.GetAddress(0, 0))); ApplicationContainer apps = ping.Install(n.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("ping6.tr")); diff --git a/examples/ipv6/radvd-one-prefix.cc b/examples/ipv6/radvd-one-prefix.cc index 035cdfd65..9496546c2 100644 --- a/examples/ipv6/radvd-one-prefix.cc +++ b/examples/ipv6/radvd-one-prefix.cc @@ -114,8 +114,8 @@ main(int argc, char** argv) radvdHelper.GetRadvdInterface(iic2.GetInterfaceIndex(1))->SetSendAdvert(false); ApplicationContainer radvdApps = radvdHelper.Install(r); - radvdApps.Start(Seconds(1.0)); - radvdApps.Stop(Seconds(10.0)); + radvdApps.Start(Seconds(1)); + radvdApps.Stop(Seconds(10)); /* Create a Ping application to send ICMPv6 echo request from n0 to n1 via R */ uint32_t packetSize = 1024; @@ -126,8 +126,8 @@ main(int argc, char** argv) ping.SetAttribute("Count", UintegerValue(maxPacketCount)); ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(net1.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(7.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(7)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("radvd.tr")); diff --git a/examples/ipv6/radvd-two-prefix.cc b/examples/ipv6/radvd-two-prefix.cc index af3fd86d4..375e7ae94 100644 --- a/examples/ipv6/radvd-two-prefix.cc +++ b/examples/ipv6/radvd-two-prefix.cc @@ -174,8 +174,8 @@ main(int argc, char** argv) } ApplicationContainer radvdApps = radvdHelper.Install(r); - radvdApps.Start(Seconds(1.0)); - radvdApps.Stop(Seconds(2.0)); + radvdApps.Start(Seconds(1)); + radvdApps.Stop(Seconds(2)); /* Create a Ping application to send ICMPv6 echo request from n0 to n1 via R */ uint32_t packetSize = 1024; @@ -187,18 +187,18 @@ main(int argc, char** argv) ping.SetAttribute("Count", UintegerValue(maxPacketCount)); ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(net1.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(5.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(5)); Ptr routingStream = Create(&std::cout); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(2.0), n0, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(10.0), n0, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(2), n0, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(10), n0, routingStream); IpAddressHelper ipAddressHelper; /* RA should be received, two prefixes + routes + default route should be present */ - Simulator::Schedule(Seconds(2.0), &IpAddressHelper::PrintIpAddresses, &ipAddressHelper, n0); + Simulator::Schedule(Seconds(2), &IpAddressHelper::PrintIpAddresses, &ipAddressHelper, n0); /* at the end, RA addresses and routes should be cleared */ - Simulator::Schedule(Seconds(10.0), &IpAddressHelper::PrintIpAddresses, &ipAddressHelper, n0); + Simulator::Schedule(Seconds(10), &IpAddressHelper::PrintIpAddresses, &ipAddressHelper, n0); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("radvd-two-prefix.tr")); diff --git a/examples/ipv6/wsn-ping6.cc b/examples/ipv6/wsn-ping6.cc index d879f4f93..a309110a7 100644 --- a/examples/ipv6/wsn-ping6.cc +++ b/examples/ipv6/wsn-ping6.cc @@ -114,8 +114,8 @@ main(int argc, char** argv) ping.SetAttribute("Interval", TimeValue(interPacketInterval)); ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(nodes.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; lrWpanHelper.EnableAsciiAll(ascii.CreateFileStream("ping6wsn.tr")); diff --git a/examples/naming/object-names.cc b/examples/naming/object-names.cc index 3f392681b..e5738cb75 100644 --- a/examples/naming/object-names.cc +++ b/examples/naming/object-names.cc @@ -142,8 +142,8 @@ main(int argc, char* argv[]) // directly. // ApplicationContainer apps = server.Install("/Names/server"); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); uint32_t packetSize = 1024; uint32_t maxPacketCount = 1; @@ -157,8 +157,8 @@ main(int argc, char* argv[]) // directly. // apps = client.Install("/Names/client"); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); // // Use the Config system to connect a trace source using the object name diff --git a/examples/realtime/realtime-udp-echo.cc b/examples/realtime/realtime-udp-echo.cc index 6eeab1673..7b647702f 100644 --- a/examples/realtime/realtime-udp-echo.cc +++ b/examples/realtime/realtime-udp-echo.cc @@ -76,8 +76,8 @@ main(int argc, char* argv[]) uint16_t port = 9; // well-known echo port number UdpEchoServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // // Create a UdpEchoClient application to send UDP datagrams from node zero to @@ -91,8 +91,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(packetSize)); apps = client.Install(n.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("realtime-udp-echo.tr")); @@ -101,7 +101,7 @@ main(int argc, char* argv[]) // // Now, do the actual simulation. // - Simulator::Stop(Seconds(11.0)); + Simulator::Stop(Seconds(11)); NS_LOG_INFO("Run Simulation."); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/realtime/realtime-udp-echo.py b/examples/realtime/realtime-udp-echo.py index 9292980f2..3c2839c1a 100644 --- a/examples/realtime/realtime-udp-echo.py +++ b/examples/realtime/realtime-udp-echo.py @@ -72,8 +72,8 @@ def main(argv): port = 9 # well-known echo port number server = ns.UdpEchoServerHelper(port) apps = server.Install(n.Get(1)) - apps.Start(ns.Seconds(1.0)) - apps.Stop(ns.Seconds(10.0)) + apps.Start(ns.Seconds(1)) + apps.Stop(ns.Seconds(10)) # # Create a UdpEchoClient application to send UDP datagrams from node zero to @@ -87,8 +87,8 @@ def main(argv): client.SetAttribute("Interval", ns.TimeValue(interPacketInterval)) client.SetAttribute("PacketSize", ns.UintegerValue(packetSize)) apps = client.Install(n.Get(0)) - apps.Start(ns.Seconds(2.0)) - apps.Stop(ns.Seconds(10.0)) + apps.Start(ns.Seconds(2)) + apps.Stop(ns.Seconds(10)) ascii = ns.AsciiTraceHelper() csma.EnableAsciiAll(ascii.CreateFileStream("realtime-udp-echo.tr")) diff --git a/examples/routing/dynamic-global-routing.cc b/examples/routing/dynamic-global-routing.cc index 1b5c1b4b4..d0872e5b3 100644 --- a/examples/routing/dynamic-global-routing.cc +++ b/examples/routing/dynamic-global-routing.cc @@ -141,8 +141,8 @@ main(int argc, char* argv[]) onoff.SetAttribute("PacketSize", UintegerValue(50)); ApplicationContainer apps = onoff.Install(c.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a second OnOff application to send UDP datagrams of size // 210 bytes at a rate of 448 Kb/s @@ -153,21 +153,21 @@ main(int argc, char* argv[]) onoff2.SetAttribute("PacketSize", UintegerValue(50)); ApplicationContainer apps2 = onoff2.Install(c.Get(1)); - apps2.Start(Seconds(11.0)); - apps2.Stop(Seconds(16.0)); + apps2.Start(Seconds(11)); + apps2.Stop(Seconds(16)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(c.Get(6)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); PacketSinkHelper sink2("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps2 = sink2.Install(c.Get(6)); - apps2.Start(Seconds(11.0)); - apps2.Stop(Seconds(16.0)); + apps2.Start(Seconds(11)); + apps2.Stop(Seconds(16)); AsciiTraceHelper ascii; Ptr stream = ascii.CreateFileStream("dynamic-global-routing.tr"); diff --git a/examples/routing/global-injection-slash32.cc b/examples/routing/global-injection-slash32.cc index 8ce5dbae6..2ada0fe8c 100644 --- a/examples/routing/global-injection-slash32.cc +++ b/examples/routing/global-injection-slash32.cc @@ -129,15 +129,15 @@ main(int argc, char* argv[]) Address(InetSocketAddress(ifInAddrC.GetLocal(), port))); onoff.SetConstantRate(DataRate(6000)); ApplicationContainer apps = onoff.Install(nA); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(nC); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("global-routing-injection32.tr")); diff --git a/examples/routing/global-routing-slash32.cc b/examples/routing/global-routing-slash32.cc index f8afe7452..c3482ddc9 100644 --- a/examples/routing/global-routing-slash32.cc +++ b/examples/routing/global-routing-slash32.cc @@ -100,15 +100,15 @@ main(int argc, char* argv[]) Address(InetSocketAddress(ifInAddrC.GetLocal(), port))); onoff.SetConstantRate(DataRate(6000)); ApplicationContainer apps = onoff.Install(nA); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(nC); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("global-routing-slash32.tr")); diff --git a/examples/routing/manet-routing-compare.cc b/examples/routing/manet-routing-compare.cc index 50ae5487e..0cf9ac366 100644 --- a/examples/routing/manet-routing-compare.cc +++ b/examples/routing/manet-routing-compare.cc @@ -173,7 +173,7 @@ RoutingExperiment::CheckThroughput() out.close(); packetsReceived = 0; - Simulator::Schedule(Seconds(1.0), &RoutingExperiment::CheckThroughput, this); + Simulator::Schedule(Seconds(1), &RoutingExperiment::CheckThroughput, this); } Ptr diff --git a/examples/routing/mixed-global-routing.cc b/examples/routing/mixed-global-routing.cc index bac2ae237..71e3a24f0 100644 --- a/examples/routing/mixed-global-routing.cc +++ b/examples/routing/mixed-global-routing.cc @@ -104,8 +104,8 @@ main(int argc, char* argv[]) onoff.SetAttribute("PacketSize", UintegerValue(50)); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; Ptr stream = ascii.CreateFileStream("mixed-global-routing.tr"); diff --git a/examples/routing/rip-simple-network.cc b/examples/routing/rip-simple-network.cc index 0bca62c6b..94eadf942 100644 --- a/examples/routing/rip-simple-network.cc +++ b/examples/routing/rip-simple-network.cc @@ -204,25 +204,25 @@ main(int argc, char** argv) { Ptr routingStream = Create(&std::cout); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), a, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), b, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), c, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30.0), d, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30), a, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30), b, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30), c, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(30), d, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), a, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), b, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), c, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60.0), d, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60), a, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60), b, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60), c, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(60), d, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), a, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), b, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), c, routingStream); - Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90.0), d, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90), a, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90), b, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90), c, routingStream); + Ipv4RoutingHelper::PrintRoutingTableAt(Seconds(90), d, routingStream); } NS_LOG_INFO("Create Applications."); uint32_t packetSize = 1024; - Time interPacketInterval = Seconds(1.0); + Time interPacketInterval = Seconds(1); PingHelper ping(Ipv4Address("10.0.6.2")); ping.SetAttribute("Interval", TimeValue(interPacketInterval)); @@ -232,8 +232,8 @@ main(int argc, char** argv) ping.SetAttribute("VerboseMode", EnumValue(Ping::VerboseMode::VERBOSE)); } ApplicationContainer apps = ping.Install(src); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(110.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(110)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("rip-simple-routing.tr")); @@ -243,7 +243,7 @@ main(int argc, char** argv) /* Now, do the actual simulation. */ NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(131.0)); + Simulator::Stop(Seconds(131)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/examples/routing/ripng-simple-network.cc b/examples/routing/ripng-simple-network.cc index 59f1c3e09..c71db019f 100644 --- a/examples/routing/ripng-simple-network.cc +++ b/examples/routing/ripng-simple-network.cc @@ -209,25 +209,25 @@ main(int argc, char** argv) { Ptr routingStream = Create(&std::cout); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), a, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), b, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), c, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30.0), d, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30), a, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30), b, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30), c, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(30), d, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), a, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), b, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), c, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60.0), d, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60), a, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60), b, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60), c, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(60), d, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), a, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), b, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), c, routingStream); - Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90.0), d, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90), a, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90), b, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90), c, routingStream); + Ipv6RoutingHelper::PrintRoutingTableAt(Seconds(90), d, routingStream); } NS_LOG_INFO("Create Applications."); uint32_t packetSize = 1024; - Time interPacketInterval = Seconds(1.0); + Time interPacketInterval = Seconds(1); PingHelper ping(iic7.GetAddress(1, 1)); ping.SetAttribute("Interval", TimeValue(interPacketInterval)); @@ -237,8 +237,8 @@ main(int argc, char** argv) ping.SetAttribute("VerboseMode", EnumValue(Ping::VerboseMode::VERBOSE)); } ApplicationContainer apps = ping.Install(src); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(110.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(110)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("ripng-simple-routing.tr")); diff --git a/examples/routing/simple-alternate-routing.cc b/examples/routing/simple-alternate-routing.cc index 04cac0c4e..6210ddabb 100644 --- a/examples/routing/simple-alternate-routing.cc +++ b/examples/routing/simple-alternate-routing.cc @@ -131,14 +131,14 @@ main(int argc, char* argv[]) ApplicationContainer apps = onoff.Install(c.Get(3)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(c.Get(1)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("simple-alternate-routing.tr")); diff --git a/examples/routing/simple-global-routing.cc b/examples/routing/simple-global-routing.cc index f36e34dab..b62c1e326 100644 --- a/examples/routing/simple-global-routing.cc +++ b/examples/routing/simple-global-routing.cc @@ -110,26 +110,26 @@ main(int argc, char* argv[]) Address(InetSocketAddress(i3i2.GetAddress(0), port))); onoff.SetConstantRate(DataRate("448kb/s")); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(c.Get(3)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a similar flow from n3 to n1, starting at time 1.1 seconds onoff.SetAttribute("Remote", AddressValue(InetSocketAddress(i1i2.GetAddress(0), port))); apps = onoff.Install(c.Get(3)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets apps = sink.Install(c.Get(1)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("simple-global-routing.tr")); diff --git a/examples/routing/simple-routing-ping6.cc b/examples/routing/simple-routing-ping6.cc index 512615d58..946733262 100644 --- a/examples/routing/simple-routing-ping6.cc +++ b/examples/routing/simple-routing-ping6.cc @@ -136,8 +136,8 @@ main(int argc, char** argv) ping.SetAttribute("Count", UintegerValue(maxPacketCount)); ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(net1.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(20)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("simple-routing-ping6.tr")); diff --git a/examples/routing/simple-routing-ping6.py b/examples/routing/simple-routing-ping6.py index c380b033b..be18d0d5b 100644 --- a/examples/routing/simple-routing-ping6.py +++ b/examples/routing/simple-routing-ping6.py @@ -69,7 +69,7 @@ def main(argv): print("Application") packetSize = 1024 maxPacketCount = 5 - interPacketInterval = ns.Seconds(1.0) + interPacketInterval = ns.Seconds(1) # ping = ns.PingHelper(i2.GetAddress(1, 1).ConvertTo()) ping = ns.PingHelper(i2.GetAddress(1, 1).ConvertTo()) @@ -81,8 +81,8 @@ def main(argv): ping.SetAttribute("Size", ns.UintegerValue(packetSize)) apps = ping.Install(ns.NodeContainer(net1.Get(0))) - apps.Start(ns.Seconds(2.0)) - apps.Stop(ns.Seconds(20.0)) + apps.Start(ns.Seconds(2)) + apps.Stop(ns.Seconds(20)) print("Tracing") ascii = ns.AsciiTraceHelper() diff --git a/examples/routing/static-routing-slash32.cc b/examples/routing/static-routing-slash32.cc index d677c60fc..519bc7b75 100644 --- a/examples/routing/static-routing-slash32.cc +++ b/examples/routing/static-routing-slash32.cc @@ -106,15 +106,15 @@ main(int argc, char* argv[]) Address(InetSocketAddress(ifInAddrC.GetLocal(), port))); onoff.SetConstantRate(DataRate(6000)); ApplicationContainer apps = onoff.Install(nA); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(nC); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("static-routing-slash32.tr")); diff --git a/examples/socket/socket-bound-static-routing.cc b/examples/socket/socket-bound-static-routing.cc index b77a9eaf7..e00e6279b 100644 --- a/examples/socket/socket-bound-static-routing.cc +++ b/examples/socket/socket-bound-static-routing.cc @@ -144,17 +144,17 @@ main(int argc, char* argv[]) // First packet as normal (goes via Rtr1) Simulator::Schedule(Seconds(0.1), &SendStuff, srcSocket, dstaddr, dstport); // Second via Rtr1 explicitly - Simulator::Schedule(Seconds(1.0), &BindSock, srcSocket, SrcToRtr1); + Simulator::Schedule(Seconds(1), &BindSock, srcSocket, SrcToRtr1); Simulator::Schedule(Seconds(1.1), &SendStuff, srcSocket, dstaddr, dstport); // Third via Rtr2 explicitly - Simulator::Schedule(Seconds(2.0), &BindSock, srcSocket, SrcToRtr2); + Simulator::Schedule(Seconds(2), &BindSock, srcSocket, SrcToRtr2); Simulator::Schedule(Seconds(2.1), &SendStuff, srcSocket, dstaddr, dstport); // Fourth again as normal (goes via Rtr1) - Simulator::Schedule(Seconds(3.0), &BindSock, srcSocket, Ptr(nullptr)); + Simulator::Schedule(Seconds(3), &BindSock, srcSocket, Ptr(nullptr)); Simulator::Schedule(Seconds(3.1), &SendStuff, srcSocket, dstaddr, dstport); // If you uncomment what's below, it results in ASSERT failing since you can't // bind to a socket not existing on a node - // Simulator::Schedule(Seconds(4.0),&BindSock, srcSocket, dDstRtrdDst.Get(0)); + // Simulator::Schedule(Seconds(4),&BindSock, srcSocket, dDstRtrdDst.Get(0)); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/socket/socket-bound-tcp-static-routing.cc b/examples/socket/socket-bound-tcp-static-routing.cc index 19c744017..aeb0bd52c 100644 --- a/examples/socket/socket-bound-tcp-static-routing.cc +++ b/examples/socket/socket-bound-tcp-static-routing.cc @@ -149,8 +149,8 @@ main(int argc, char* argv[]) PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), dstport)); ApplicationContainer apps = sink.Install(nDst); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(10)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("socket-bound-tcp-static-routing.tr")); @@ -162,17 +162,17 @@ main(int argc, char* argv[]) // First packet as normal (goes via Rtr1) Simulator::Schedule(Seconds(0.1), &StartFlow, srcSocket1, dstaddr, dstport); // Second via Rtr1 explicitly - Simulator::Schedule(Seconds(1.0), &BindSock, srcSocket2, SrcToRtr1); + Simulator::Schedule(Seconds(1), &BindSock, srcSocket2, SrcToRtr1); Simulator::Schedule(Seconds(1.1), &StartFlow, srcSocket2, dstaddr, dstport); // Third via Rtr2 explicitly - Simulator::Schedule(Seconds(2.0), &BindSock, srcSocket3, SrcToRtr2); + Simulator::Schedule(Seconds(2), &BindSock, srcSocket3, SrcToRtr2); Simulator::Schedule(Seconds(2.1), &StartFlow, srcSocket3, dstaddr, dstport); // Fourth again as normal (goes via Rtr1) - Simulator::Schedule(Seconds(3.0), &BindSock, srcSocket4, Ptr(nullptr)); + Simulator::Schedule(Seconds(3), &BindSock, srcSocket4, Ptr(nullptr)); Simulator::Schedule(Seconds(3.1), &StartFlow, srcSocket4, dstaddr, dstport); // If you uncomment what's below, it results in ASSERT failing since you can't // bind to a socket not existing on a node - // Simulator::Schedule(Seconds(4.0),&BindSock, srcSocket, dDstRtrdDst.Get(0)); + // Simulator::Schedule(Seconds(4),&BindSock, srcSocket, dDstRtrdDst.Get(0)); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/socket/socket-options-ipv4.cc b/examples/socket/socket-options-ipv4.cc index a2ac266be..d4a7fedca 100644 --- a/examples/socket/socket-options-ipv4.cc +++ b/examples/socket/socket-options-ipv4.cc @@ -136,7 +136,7 @@ main(int argc, char* argv[]) // Schedule SendPacket Time interPacketInterval = Seconds(packetInterval); Simulator::ScheduleWithContext(source->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &SendPacket, source, packetSize, diff --git a/examples/socket/socket-options-ipv6.cc b/examples/socket/socket-options-ipv6.cc index 5344b567d..5b0fbc296 100644 --- a/examples/socket/socket-options-ipv6.cc +++ b/examples/socket/socket-options-ipv6.cc @@ -135,7 +135,7 @@ main(int argc, char* argv[]) // Schedule SendPacket Time interPacketInterval = Seconds(packetInterval); Simulator::ScheduleWithContext(source->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &SendPacket, source, packetSize, diff --git a/examples/tcp/star.cc b/examples/tcp/star.cc index 30f51b5ac..2789aad9a 100644 --- a/examples/tcp/star.cc +++ b/examples/tcp/star.cc @@ -67,8 +67,8 @@ main(int argc, char* argv[]) Address hubLocalAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", hubLocalAddress); ApplicationContainer hubApp = packetSinkHelper.Install(star.GetHub()); - hubApp.Start(Seconds(1.0)); - hubApp.Stop(Seconds(10.0)); + hubApp.Start(Seconds(1)); + hubApp.Stop(Seconds(10)); // // Create OnOff applications to send TCP to the hub, one on each spoke node. @@ -85,8 +85,8 @@ main(int argc, char* argv[]) onOffHelper.SetAttribute("Remote", remoteAddress); spokeApps.Add(onOffHelper.Install(star.GetSpokeNode(i))); } - spokeApps.Start(Seconds(1.0)); - spokeApps.Stop(Seconds(10.0)); + spokeApps.Start(Seconds(1)); + spokeApps.Stop(Seconds(10)); NS_LOG_INFO("Enable static global routing."); // diff --git a/examples/tcp/tcp-bbr-example.cc b/examples/tcp/tcp-bbr-example.cc index 9f4e560ad..e0ae561c6 100644 --- a/examples/tcp/tcp-bbr-example.cc +++ b/examples/tcp/tcp-bbr-example.cc @@ -221,7 +221,7 @@ main(int argc, char* argv[]) // Install application on the receiver PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer sinkApps = sink.Install(receiver.Get(0)); - sinkApps.Start(Seconds(0.0)); + sinkApps.Start(Seconds(0)); sinkApps.Stop(stopTime); // Create a new directory to store the output of the program diff --git a/examples/tcp/tcp-bulk-send.cc b/examples/tcp/tcp-bulk-send.cc index 5bc21e578..a5bc7b4a5 100644 --- a/examples/tcp/tcp-bulk-send.cc +++ b/examples/tcp/tcp-bulk-send.cc @@ -85,16 +85,16 @@ main(int argc, char* argv[]) // Set the amount of data to send in bytes. Zero is unlimited. source.SetAttribute("MaxBytes", UintegerValue(maxBytes)); ApplicationContainer sourceApps = source.Install(nodes.Get(0)); - sourceApps.Start(Seconds(0.0)); - sourceApps.Stop(Seconds(10.0)); + sourceApps.Start(Seconds(0)); + sourceApps.Stop(Seconds(10)); // // Create a PacketSinkApplication and install it on node 1 // PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer sinkApps = sink.Install(nodes.Get(1)); - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(10.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(10)); // // Set up tracing if enabled @@ -110,7 +110,7 @@ main(int argc, char* argv[]) // Now, do the actual simulation. // NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/examples/tcp/tcp-large-transfer.cc b/examples/tcp/tcp-large-transfer.cc index b59b65b20..e4851fdfc 100644 --- a/examples/tcp/tcp-large-transfer.cc +++ b/examples/tcp/tcp-large-transfer.cc @@ -151,8 +151,8 @@ main(int argc, char* argv[]) InetSocketAddress(Ipv4Address::GetAny(), servPort)); ApplicationContainer apps = sink.Install(n1n2.Get(1)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(3.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(3)); // Create a source to send packets from n0. Instead of a full Application // and the helper APIs you might see in other example files, this example diff --git a/examples/tcp/tcp-linux-reno.cc b/examples/tcp/tcp-linux-reno.cc index 5a8c90d7a..3b644b0e8 100644 --- a/examples/tcp/tcp-linux-reno.cc +++ b/examples/tcp/tcp-linux-reno.cc @@ -92,8 +92,8 @@ InstallBulkSend(Ptr node, BulkSendHelper source(socketFactory, InetSocketAddress(address, port)); source.SetAttribute("MaxBytes", UintegerValue(0)); ApplicationContainer sourceApps = source.Install(node); - sourceApps.Start(Seconds(10.0)); - Simulator::Schedule(Seconds(10.0) + Seconds(0.001), &TraceCwnd, nodeId, cwndWindow, CwndTrace); + sourceApps.Start(Seconds(10)); + Simulator::Schedule(Seconds(10) + Seconds(0.001), &TraceCwnd, nodeId, cwndWindow, CwndTrace); sourceApps.Stop(stopTime); } @@ -103,7 +103,7 @@ InstallPacketSink(Ptr node, uint16_t port, std::string socketFactory) { PacketSinkHelper sink(socketFactory, InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer sinkApps = sink.Install(node); - sinkApps.Start(Seconds(10.0)); + sinkApps.Start(Seconds(10)); sinkApps.Stop(stopTime); } diff --git a/examples/tcp/tcp-pcap-nanosec-example.cc b/examples/tcp/tcp-pcap-nanosec-example.cc index 265896a11..7157a4d8e 100644 --- a/examples/tcp/tcp-pcap-nanosec-example.cc +++ b/examples/tcp/tcp-pcap-nanosec-example.cc @@ -108,16 +108,16 @@ main(int argc, char* argv[]) // Set the amount of data to send in bytes. Zero is unlimited. source.SetAttribute("MaxBytes", UintegerValue(maxBytes)); ApplicationContainer sourceApps = source.Install(nodes.Get(0)); - sourceApps.Start(Seconds(0.0)); - sourceApps.Stop(Seconds(10.0)); + sourceApps.Start(Seconds(0)); + sourceApps.Stop(Seconds(10)); // // Create a PacketSinkApplication and install it on node 1 // PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer sinkApps = sink.Install(nodes.Get(1)); - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(10.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(10)); // // Set up tracing if enabled @@ -132,7 +132,7 @@ main(int argc, char* argv[]) // Now, do the actual simulation. // NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/examples/tcp/tcp-star-server.cc b/examples/tcp/tcp-star-server.cc index a725a57f2..731be7d88 100644 --- a/examples/tcp/tcp-star-server.cc +++ b/examples/tcp/tcp-star-server.cc @@ -115,8 +115,8 @@ main(int argc, char* argv[]) Address sinkLocalAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", sinkLocalAddress); ApplicationContainer sinkApp = sinkHelper.Install(serverNode); - sinkApp.Start(Seconds(1.0)); - sinkApp.Stop(Seconds(10.0)); + sinkApp.Start(Seconds(1)); + sinkApp.Stop(Seconds(10)); // Create the OnOff applications to send TCP to the server OnOffHelper clientHelper("ns3::TcpSocketFactory", Address()); @@ -133,8 +133,8 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(clientNodes.Get(i))); } - clientApps.Start(Seconds(1.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(1)); + clientApps.Stop(Seconds(10)); // configure tracing AsciiTraceHelper ascii; diff --git a/examples/traffic-control/red-vs-fengadaptive.cc b/examples/traffic-control/red-vs-fengadaptive.cc index f4764fdaa..ae901981f 100644 --- a/examples/traffic-control/red-vs-fengadaptive.cc +++ b/examples/traffic-control/red-vs-fengadaptive.cc @@ -139,8 +139,8 @@ main(int argc, char* argv[]) { sinkApps.Add(packetSinkHelper.Install(d.GetLeft(i))); } - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(30.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(30)); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount(); ++i) @@ -150,8 +150,8 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(1.0)); // Start 1 second after sink - clientApps.Stop(Seconds(15.0)); // Stop before the sink + clientApps.Start(Seconds(1)); // Start 1 second after sink + clientApps.Stop(Seconds(15)); // Stop before the sink Ipv4GlobalRoutingHelper::PopulateRoutingTables(); diff --git a/examples/traffic-control/red-vs-nlred.cc b/examples/traffic-control/red-vs-nlred.cc index 1eff4bfb9..b9cae3815 100644 --- a/examples/traffic-control/red-vs-nlred.cc +++ b/examples/traffic-control/red-vs-nlred.cc @@ -140,8 +140,8 @@ main(int argc, char* argv[]) { sinkApps.Add(packetSinkHelper.Install(d.GetLeft(i))); } - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(30.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(30)); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount(); ++i) @@ -151,8 +151,8 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(1.0)); // Start 1 second after sink - clientApps.Stop(Seconds(15.0)); // Stop before the sink + clientApps.Start(Seconds(1)); // Start 1 second after sink + clientApps.Stop(Seconds(15)); // Stop before the sink Ipv4GlobalRoutingHelper::PopulateRoutingTables(); diff --git a/examples/traffic-control/tbf-example.cc b/examples/traffic-control/tbf-example.cc index bd9ade7e9..5192f4a73 100644 --- a/examples/traffic-control/tbf-example.cc +++ b/examples/traffic-control/tbf-example.cc @@ -108,7 +108,7 @@ main(int argc, char* argv[]) PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress); ApplicationContainer sinkApp = packetSinkHelper.Install(nodes.Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); sinkApp.Stop(Seconds(simulationTime + 0.1)); uint32_t payloadSize = 1448; @@ -126,7 +126,7 @@ main(int argc, char* argv[]) onoff.SetAttribute("Tos", UintegerValue(0xb8)); apps.Add(onoff.Install(nodes.Get(1))); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); apps.Stop(Seconds(simulationTime + 0.1)); Simulator::Stop(Seconds(simulationTime + 5)); diff --git a/examples/traffic-control/traffic-control-example.cc b/examples/traffic-control/traffic-control-example.cc index 4ef439ac0..ee271d1d4 100644 --- a/examples/traffic-control/traffic-control-example.cc +++ b/examples/traffic-control/traffic-control-example.cc @@ -149,7 +149,7 @@ main(int argc, char* argv[]) PacketSinkHelper packetSinkHelper(socketType, localAddress); ApplicationContainer sinkApp = packetSinkHelper.Install(nodes.Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); sinkApp.Stop(Seconds(simulationTime + 0.1)); uint32_t payloadSize = 1448; @@ -166,7 +166,7 @@ main(int argc, char* argv[]) onoff.SetAttribute("Remote", AddressValue(rmt)); onoff.SetAttribute("Tos", UintegerValue(0xb8)); apps.Add(onoff.Install(nodes.Get(1))); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); apps.Stop(Seconds(simulationTime + 0.1)); FlowMonitorHelper flowmon; diff --git a/examples/tutorial/first.cc b/examples/tutorial/first.cc index 262741bf7..23f275a45 100644 --- a/examples/tutorial/first.cc +++ b/examples/tutorial/first.cc @@ -50,17 +50,17 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(nodes.Get(1)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); UdpEchoClientHelper echoClient(interfaces.GetAddress(1), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(nodes.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/tutorial/first.py b/examples/tutorial/first.py index ef753b330..f2c2f60af 100644 --- a/examples/tutorial/first.py +++ b/examples/tutorial/first.py @@ -41,18 +41,18 @@ interfaces = address.Assign(devices) echoServer = ns.UdpEchoServerHelper(9) serverApps = echoServer.Install(nodes.Get(1)) -serverApps.Start(ns.Seconds(1.0)) -serverApps.Stop(ns.Seconds(10.0)) +serverApps.Start(ns.Seconds(1)) +serverApps.Stop(ns.Seconds(10)) address = interfaces.GetAddress(1).ConvertTo() echoClient = ns.UdpEchoClientHelper(address, 9) echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1)) -echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0))) +echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1))) echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024)) clientApps = echoClient.Install(nodes.Get(0)) -clientApps.Start(ns.Seconds(2.0)) -clientApps.Stop(ns.Seconds(10.0)) +clientApps.Start(ns.Seconds(2)) +clientApps.Stop(ns.Seconds(10)) ns.Simulator.Run() ns.Simulator.Destroy() diff --git a/examples/tutorial/second.cc b/examples/tutorial/second.cc index 16983acab..76c8b236d 100644 --- a/examples/tutorial/second.cc +++ b/examples/tutorial/second.cc @@ -79,17 +79,17 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(p2pNodes.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); Ipv4GlobalRoutingHelper::PopulateRoutingTables(); diff --git a/examples/tutorial/second.py b/examples/tutorial/second.py index 73c2a9905..e5a0f4722 100644 --- a/examples/tutorial/second.py +++ b/examples/tutorial/second.py @@ -69,17 +69,17 @@ csmaInterfaces = address.Assign(csmaDevices) echoServer = ns.UdpEchoServerHelper(9) serverApps = echoServer.Install(csmaNodes.Get(nCsma.value)) -serverApps.Start(ns.Seconds(1.0)) -serverApps.Stop(ns.Seconds(10.0)) +serverApps.Start(ns.Seconds(1)) +serverApps.Stop(ns.Seconds(10)) echoClient = ns.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma.value).ConvertTo(), 9) echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1)) -echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0))) +echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1))) echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024)) clientApps = echoClient.Install(p2pNodes.Get(0)) -clientApps.Start(ns.Seconds(2.0)) -clientApps.Stop(ns.Seconds(10.0)) +clientApps.Start(ns.Seconds(2)) +clientApps.Stop(ns.Seconds(10)) ns.Ipv4GlobalRoutingHelper.PopulateRoutingTables() diff --git a/examples/tutorial/third.cc b/examples/tutorial/third.cc index 88c418831..facd57c09 100644 --- a/examples/tutorial/third.cc +++ b/examples/tutorial/third.cc @@ -147,21 +147,21 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(wifiStaNodes.Get(nWifi - 1)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); if (tracing) { diff --git a/examples/tutorial/third.py b/examples/tutorial/third.py index e28b7dece..69fc36dfa 100644 --- a/examples/tutorial/third.py +++ b/examples/tutorial/third.py @@ -135,21 +135,21 @@ address.Assign(apDevices) echoServer = ns.UdpEchoServerHelper(9) serverApps = echoServer.Install(csmaNodes.Get(nCsma.value)) -serverApps.Start(ns.Seconds(1.0)) -serverApps.Stop(ns.Seconds(10.0)) +serverApps.Start(ns.Seconds(1)) +serverApps.Stop(ns.Seconds(10)) echoClient = ns.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma.value).ConvertTo(), 9) echoClient.SetAttribute("MaxPackets", ns.UintegerValue(1)) -echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1.0))) +echoClient.SetAttribute("Interval", ns.TimeValue(ns.Seconds(1))) echoClient.SetAttribute("PacketSize", ns.UintegerValue(1024)) clientApps = echoClient.Install(wifiStaNodes.Get(nWifi.value - 1)) -clientApps.Start(ns.Seconds(2.0)) -clientApps.Stop(ns.Seconds(10.0)) +clientApps.Start(ns.Seconds(2)) +clientApps.Stop(ns.Seconds(10)) ns.Ipv4GlobalRoutingHelper.PopulateRoutingTables() -ns.Simulator.Stop(ns.Seconds(10.0)) +ns.Simulator.Stop(ns.Seconds(10)) if tracing.value: phy.SetPcapDataLinkType(phy.DLT_IEEE802_11_RADIO) diff --git a/examples/udp-client-server/udp-client-server.cc b/examples/udp-client-server/udp-client-server.cc index fcb4b4cb0..50b9f2327 100644 --- a/examples/udp-client-server/udp-client-server.cc +++ b/examples/udp-client-server/udp-client-server.cc @@ -82,8 +82,8 @@ main(int argc, char* argv[]) uint16_t port = 4000; UdpServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); NS_LOG_INFO("Create UdpClient application on node 0 to send to node 1."); uint32_t MaxPacketSize = 1024; @@ -94,8 +94,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(MaxPacketSize)); apps = client.Install(n.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); NS_LOG_INFO("Run Simulation."); Simulator::Run(); diff --git a/examples/udp-client-server/udp-trace-client-server.cc b/examples/udp-client-server/udp-trace-client-server.cc index b4075bb6c..1e3ec90eb 100644 --- a/examples/udp-client-server/udp-trace-client-server.cc +++ b/examples/udp-client-server/udp-trace-client-server.cc @@ -81,16 +81,16 @@ main(int argc, char* argv[]) NS_LOG_INFO("Create UdpServer application on node 1."); UdpServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); NS_LOG_INFO("Create UdpClient application on node 0 to send to node 1."); uint32_t MaxPacketSize = 1472; // Back off 20 (IP) + 8 (UDP) bytes from MTU UdpTraceClientHelper client(serverAddress); client.SetAttribute("MaxPacketSize", UintegerValue(MaxPacketSize)); apps = client.Install(n.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); NS_LOG_INFO("Run Simulation."); Simulator::Run(); diff --git a/examples/udp/udp-echo.cc b/examples/udp/udp-echo.cc index 60eca393c..9d2be0892 100644 --- a/examples/udp/udp-echo.cc +++ b/examples/udp/udp-echo.cc @@ -92,8 +92,8 @@ main(int argc, char* argv[]) uint16_t port = 9; // well-known echo port number UdpEchoServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // // Create a UdpEchoClient application to send UDP datagrams from node zero to @@ -107,8 +107,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(packetSize)); apps = client.Install(n.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); #if 0 // diff --git a/examples/wireless/wifi-80211e-txop.cc b/examples/wireless/wifi-80211e-txop.cc index 4fb46613b..deac1620b 100644 --- a/examples/wireless/wifi-80211e-txop.cc +++ b/examples/wireless/wifi-80211e-txop.cc @@ -284,8 +284,8 @@ main(int argc, char* argv[]) uint16_t port = 5001; UdpServerHelper serverA(port); ApplicationContainer serverAppA = serverA.Install(wifiApNodes.Get(0)); - serverAppA.Start(Seconds(0.0)); - serverAppA.Stop(simulationTime + Seconds(1.0)); + serverAppA.Start(Seconds(0)); + serverAppA.Stop(simulationTime + Seconds(1)); InetSocketAddress destA(ApInterfaceA.GetAddress(0), port); @@ -297,13 +297,13 @@ main(int argc, char* argv[]) clientA.SetAttribute("Tos", UintegerValue(0x70)); // AC_BE ApplicationContainer clientAppA = clientA.Install(wifiStaNodes.Get(0)); - clientAppA.Start(Seconds(1.0)); - clientAppA.Stop(simulationTime + Seconds(1.0)); + clientAppA.Start(Seconds(1)); + clientAppA.Stop(simulationTime + Seconds(1)); UdpServerHelper serverB(port); ApplicationContainer serverAppB = serverB.Install(wifiApNodes.Get(1)); - serverAppB.Start(Seconds(0.0)); - serverAppB.Stop(simulationTime + Seconds(1.0)); + serverAppB.Start(Seconds(0)); + serverAppB.Stop(simulationTime + Seconds(1)); InetSocketAddress destB(ApInterfaceB.GetAddress(0), port); @@ -315,13 +315,13 @@ main(int argc, char* argv[]) clientB.SetAttribute("Tos", UintegerValue(0x70)); // AC_BE ApplicationContainer clientAppB = clientB.Install(wifiStaNodes.Get(1)); - clientAppB.Start(Seconds(1.0)); - clientAppB.Stop(simulationTime + Seconds(1.0)); + clientAppB.Start(Seconds(1)); + clientAppB.Stop(simulationTime + Seconds(1)); UdpServerHelper serverC(port); ApplicationContainer serverAppC = serverC.Install(wifiApNodes.Get(2)); - serverAppC.Start(Seconds(0.0)); - serverAppC.Stop(simulationTime + Seconds(1.0)); + serverAppC.Start(Seconds(0)); + serverAppC.Stop(simulationTime + Seconds(1)); InetSocketAddress destC(ApInterfaceC.GetAddress(0), port); @@ -333,13 +333,13 @@ main(int argc, char* argv[]) clientC.SetAttribute("Tos", UintegerValue(0xb8)); // AC_VI ApplicationContainer clientAppC = clientC.Install(wifiStaNodes.Get(2)); - clientAppC.Start(Seconds(1.0)); - clientAppC.Stop(simulationTime + Seconds(1.0)); + clientAppC.Start(Seconds(1)); + clientAppC.Stop(simulationTime + Seconds(1)); UdpServerHelper serverD(port); ApplicationContainer serverAppD = serverD.Install(wifiApNodes.Get(3)); - serverAppD.Start(Seconds(0.0)); - serverAppD.Stop(simulationTime + Seconds(1.0)); + serverAppD.Start(Seconds(0)); + serverAppD.Stop(simulationTime + Seconds(1)); InetSocketAddress destD(ApInterfaceD.GetAddress(0), port); @@ -351,8 +351,8 @@ main(int argc, char* argv[]) clientD.SetAttribute("Tos", UintegerValue(0xb8)); // AC_VI ApplicationContainer clientAppD = clientD.Install(wifiStaNodes.Get(3)); - clientAppD.Start(Seconds(1.0)); - clientAppD.Stop(simulationTime + Seconds(1.0)); + clientAppD.Start(Seconds(1)); + clientAppD.Stop(simulationTime + Seconds(1)); if (enablePcap) { @@ -366,7 +366,7 @@ main(int argc, char* argv[]) phy.EnablePcap("STA_D", staDeviceD.Get(0)); } - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); /* Show results */ diff --git a/examples/wireless/wifi-80211n-mimo.cc b/examples/wireless/wifi-80211n-mimo.cc index f1ca276d6..09551e4ba 100644 --- a/examples/wireless/wifi-80211n-mimo.cc +++ b/examples/wireless/wifi-80211n-mimo.cc @@ -214,8 +214,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper server(port); serverApp = server.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / maxLoad; UdpClientHelper client(staNodeInterface.GetAddress(0), port); @@ -223,8 +223,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(Seconds(packetInterval))); client.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } else { @@ -233,8 +233,8 @@ main(int argc, char* argv[]) Address localAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress); serverApp = packetSinkHelper.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny()); onoff.SetAttribute("OnTime", @@ -246,13 +246,13 @@ main(int argc, char* argv[]) AddressValue remoteAddress(InetSocketAddress(staNodeInterface.GetAddress(0), port)); onoff.SetAttribute("Remote", remoteAddress); ApplicationContainer clientApp = onoff.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); double throughput = 0; diff --git a/examples/wireless/wifi-adhoc.cc b/examples/wireless/wifi-adhoc.cc index 4e465d328..de7889465 100644 --- a/examples/wireless/wifi-adhoc.cc +++ b/examples/wireless/wifi-adhoc.cc @@ -124,7 +124,7 @@ Experiment::AdvancePosition(Ptr node) return; } SetPosition(node, pos); - Simulator::Schedule(Seconds(1.0), &Experiment::AdvancePosition, this, node); + Simulator::Schedule(Seconds(1), &Experiment::AdvancePosition, this, node); } void @@ -186,7 +186,7 @@ Experiment::Run(const WifiHelper& wifi, ApplicationContainer apps = onoff.Install(c.Get(0)); apps.Start(Seconds(0.5)); - apps.Stop(Seconds(250.0)); + apps.Stop(Seconds(250)); Simulator::Schedule(Seconds(1.5), &Experiment::AdvancePosition, this, c.Get(1)); Ptr recvSink = SetupPacketReceive(c.Get(1)); diff --git a/examples/wireless/wifi-aggregation.cc b/examples/wireless/wifi-aggregation.cc index 24652e04c..2e7343dda 100644 --- a/examples/wireless/wifi-aggregation.cc +++ b/examples/wireless/wifi-aggregation.cc @@ -270,8 +270,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper serverA(port); ApplicationContainer serverAppA = serverA.Install(wifiStaNodes.Get(0)); - serverAppA.Start(Seconds(0.0)); - serverAppA.Stop(simulationTime + Seconds(1.0)); + serverAppA.Start(Seconds(0)); + serverAppA.Stop(simulationTime + Seconds(1)); UdpClientHelper clientA(StaInterfaceA.GetAddress(0), port); clientA.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -279,13 +279,13 @@ main(int argc, char* argv[]) clientA.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppA = clientA.Install(wifiApNodes.Get(0)); - clientAppA.Start(Seconds(1.0)); - clientAppA.Stop(simulationTime + Seconds(1.0)); + clientAppA.Start(Seconds(1)); + clientAppA.Stop(simulationTime + Seconds(1)); UdpServerHelper serverB(port); ApplicationContainer serverAppB = serverB.Install(wifiStaNodes.Get(1)); - serverAppB.Start(Seconds(0.0)); - serverAppB.Stop(simulationTime + Seconds(1.0)); + serverAppB.Start(Seconds(0)); + serverAppB.Stop(simulationTime + Seconds(1)); UdpClientHelper clientB(StaInterfaceB.GetAddress(0), port); clientB.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -293,13 +293,13 @@ main(int argc, char* argv[]) clientB.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppB = clientB.Install(wifiApNodes.Get(1)); - clientAppB.Start(Seconds(1.0)); - clientAppB.Stop(simulationTime + Seconds(1.0)); + clientAppB.Start(Seconds(1)); + clientAppB.Stop(simulationTime + Seconds(1)); UdpServerHelper serverC(port); ApplicationContainer serverAppC = serverC.Install(wifiStaNodes.Get(2)); - serverAppC.Start(Seconds(0.0)); - serverAppC.Stop(simulationTime + Seconds(1.0)); + serverAppC.Start(Seconds(0)); + serverAppC.Stop(simulationTime + Seconds(1)); UdpClientHelper clientC(StaInterfaceC.GetAddress(0), port); clientC.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -307,13 +307,13 @@ main(int argc, char* argv[]) clientC.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppC = clientC.Install(wifiApNodes.Get(2)); - clientAppC.Start(Seconds(1.0)); - clientAppC.Stop(simulationTime + Seconds(1.0)); + clientAppC.Start(Seconds(1)); + clientAppC.Stop(simulationTime + Seconds(1)); UdpServerHelper serverD(port); ApplicationContainer serverAppD = serverD.Install(wifiStaNodes.Get(3)); - serverAppD.Start(Seconds(0.0)); - serverAppD.Stop(simulationTime + Seconds(1.0)); + serverAppD.Start(Seconds(0)); + serverAppD.Stop(simulationTime + Seconds(1)); UdpClientHelper clientD(StaInterfaceD.GetAddress(0), port); clientD.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -321,8 +321,8 @@ main(int argc, char* argv[]) clientD.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppD = clientD.Install(wifiApNodes.Get(3)); - clientAppD.Start(Seconds(1.0)); - clientAppD.Stop(simulationTime + Seconds(1.0)); + clientAppD.Start(Seconds(1)); + clientAppD.Stop(simulationTime + Seconds(1)); if (enablePcap) { @@ -336,7 +336,7 @@ main(int argc, char* argv[]) phy.EnablePcap("STA_D", staDeviceD.Get(0)); } - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); // Show results diff --git a/examples/wireless/wifi-ap.cc b/examples/wireless/wifi-ap.cc index 8e1b411fc..ca72b3943 100644 --- a/examples/wireless/wifi-ap.cc +++ b/examples/wireless/wifi-ap.cc @@ -150,7 +150,7 @@ AdvancePosition(Ptr node) } mobility->SetPosition(pos); - Simulator::Schedule(Seconds(1.0), &AdvancePosition, node); + Simulator::Schedule(Seconds(1), &AdvancePosition, node); } int @@ -196,7 +196,7 @@ main(int argc, char* argv[]) mobility.Install(stas); mobility.Install(ap); - Simulator::Schedule(Seconds(1.0), &AdvancePosition, ap.Get(0)); + Simulator::Schedule(Seconds(1), &AdvancePosition, ap.Get(0)); PacketSocketAddress socket; socket.SetSingleDevice(staDevs.Get(0)->GetIfIndex()); @@ -208,9 +208,9 @@ main(int argc, char* argv[]) ApplicationContainer apps = onoff.Install(stas.Get(0)); apps.Start(Seconds(0.5)); - apps.Stop(Seconds(43.0)); + apps.Stop(Seconds(43)); - Simulator::Stop(Seconds(44.0)); + Simulator::Stop(Seconds(44)); Config::Connect("/NodeList/*/DeviceList/*/Mac/MacTx", MakeCallback(&DevTxTrace)); Config::Connect("/NodeList/*/DeviceList/*/Mac/MacRx", MakeCallback(&DevRxTrace)); diff --git a/examples/wireless/wifi-ap.py b/examples/wireless/wifi-ap.py index c6a48a3cf..1a750ab47 100644 --- a/examples/wireless/wifi-ap.py +++ b/examples/wireless/wifi-ap.py @@ -76,7 +76,7 @@ ns.cppyy.cppdef( if (pos.x >= 210.0) return; mob->SetPosition(pos); - Simulator::Schedule(Seconds(1.0), AdvancePosition, node); + Simulator::Schedule(Seconds(1), AdvancePosition, node); }""" ) @@ -124,7 +124,7 @@ def main(argv): mobility.Install(stas) mobility.Install(ap) - ns.Simulator.Schedule(ns.Seconds(1.0), ns.cppyy.gbl.AdvancePosition, ap.Get(0)) + ns.Simulator.Schedule(ns.Seconds(1), ns.cppyy.gbl.AdvancePosition, ap.Get(0)) socket = ns.PacketSocketAddress() socket.SetSingleDevice(staDevs.Get(0).GetIfIndex()) @@ -136,9 +136,9 @@ def main(argv): apps = onoff.Install(ns.NodeContainer(stas.Get(0))) apps.Start(ns.Seconds(0.5)) - apps.Stop(ns.Seconds(43.0)) + apps.Stop(ns.Seconds(43)) - ns.Simulator.Stop(ns.Seconds(44.0)) + ns.Simulator.Stop(ns.Seconds(44)) # Config::Connect("/NodeList/*/DeviceList/*/Tx", MakeCallback(&DevTxTrace)); # Config::Connect("/NodeList/*/DeviceList/*/Rx", MakeCallback(&DevRxTrace)); diff --git a/examples/wireless/wifi-backward-compatibility.cc b/examples/wireless/wifi-backward-compatibility.cc index f0d19cad8..89084b763 100644 --- a/examples/wireless/wifi-backward-compatibility.cc +++ b/examples/wireless/wifi-backward-compatibility.cc @@ -196,13 +196,13 @@ main(int argc, char* argv[]) UdpServerHelper apServer(9); ApplicationContainer apServerApp = apServer.Install(wifiApNode.Get(0)); - apServerApp.Start(Seconds(0.0)); - apServerApp.Stop(simulationTime + Seconds(1.0)); + apServerApp.Start(Seconds(0)); + apServerApp.Stop(simulationTime + Seconds(1)); UdpServerHelper staServer(5001); ApplicationContainer staServerApp = staServer.Install(wifiStaNode.Get(0)); - staServerApp.Start(Seconds(0.0)); - staServerApp.Stop(simulationTime + Seconds(1.0)); + staServerApp.Start(Seconds(0)); + staServerApp.Stop(simulationTime + Seconds(1)); if (apHasTraffic) { @@ -211,8 +211,8 @@ main(int argc, char* argv[]) apClient.SetAttribute("Interval", TimeValue(Time("0.00001"))); // packets/s apClient.SetAttribute("PacketSize", UintegerValue(payloadSize)); // bytes ApplicationContainer apClientApp = apClient.Install(wifiApNode.Get(0)); - apClientApp.Start(Seconds(1.0)); - apClientApp.Stop(simulationTime + Seconds(1.0)); + apClientApp.Start(Seconds(1)); + apClientApp.Stop(simulationTime + Seconds(1)); } if (staHasTraffic) @@ -222,13 +222,13 @@ main(int argc, char* argv[]) staClient.SetAttribute("Interval", TimeValue(Time("0.00001"))); // packets/s staClient.SetAttribute("PacketSize", UintegerValue(payloadSize)); // bytes ApplicationContainer staClientApp = staClient.Install(wifiStaNode.Get(0)); - staClientApp.Start(Seconds(1.0)); - staClientApp.Stop(simulationTime + Seconds(1.0)); + staClientApp.Start(Seconds(1)); + staClientApp.Stop(simulationTime + Seconds(1)); } Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); double rxBytes; diff --git a/examples/wireless/wifi-blockack.cc b/examples/wireless/wifi-blockack.cc index ed49dd3eb..598d14c5c 100644 --- a/examples/wireless/wifi-blockack.cc +++ b/examples/wireless/wifi-blockack.cc @@ -150,12 +150,12 @@ main(int argc, char* argv[]) ApplicationContainer staApps = onOff.Install(sta); - staApps.Start(Seconds(1.0)); - staApps.Stop(Seconds(10.0)); + staApps.Start(Seconds(1)); + staApps.Stop(Seconds(10)); Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); phy.EnablePcap("test-blockack", ap->GetId(), 0); Simulator::Run(); diff --git a/examples/wireless/wifi-clear-channel-cmu.cc b/examples/wireless/wifi-clear-channel-cmu.cc index 87503c299..5ba81154c 100644 --- a/examples/wireless/wifi-clear-channel-cmu.cc +++ b/examples/wireless/wifi-clear-channel-cmu.cc @@ -197,7 +197,7 @@ Experiment::Run(const WifiHelper& wifi, uint32_t packetSize = 1014; uint32_t maxPacketCount = 200; Time interPacketInterval = Seconds(1.); - Simulator::Schedule(Seconds(1.0), + Simulator::Schedule(Seconds(1), &Experiment::GenerateTraffic, this, source, diff --git a/examples/wireless/wifi-eht-network.cc b/examples/wireless/wifi-eht-network.cc index 2fa514884..e066bda7f 100644 --- a/examples/wireless/wifi-eht-network.cc +++ b/examples/wireless/wifi-eht-network.cc @@ -537,8 +537,8 @@ main(int argc, char* argv[]) serverApp = server.Install(serverNodes.get()); streamNumber += server.AssignStreams(serverNodes.get(), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / maxLoad; for (std::size_t i = 0; i < nStations; i++) @@ -550,8 +550,8 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = client.Install(clientNodes.Get(i)); streamNumber += client.AssignStreams(clientNodes.Get(i), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } } else @@ -563,8 +563,8 @@ main(int argc, char* argv[]) serverApp = packetSinkHelper.Install(serverNodes.get()); streamNumber += packetSinkHelper.AssignStreams(serverNodes.get(), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); for (std::size_t i = 0; i < nStations; i++) { @@ -581,8 +581,8 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = onoff.Install(clientNodes.Get(i)); streamNumber += onoff.AssignStreams(clientNodes.Get(i), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } } @@ -598,10 +598,10 @@ main(int argc, char* argv[]) serverApp, payloadSize, tputInterval, - simulationTime + Seconds(1.0)); + simulationTime + Seconds(1)); } - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); // When multiple stations are used, there are chances that association requests diff --git a/examples/wireless/wifi-he-network.cc b/examples/wireless/wifi-he-network.cc index cf9ba7786..bd9021ec5 100644 --- a/examples/wireless/wifi-he-network.cc +++ b/examples/wireless/wifi-he-network.cc @@ -407,8 +407,8 @@ main(int argc, char* argv[]) serverApp = server.Install(serverNodes.get()); streamNumber += server.AssignStreams(serverNodes.get(), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / maxLoad; for (std::size_t i = 0; i < nStations; i++) @@ -420,8 +420,8 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = client.Install(clientNodes.Get(i)); streamNumber += client.AssignStreams(clientNodes.Get(i), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } } else @@ -433,8 +433,8 @@ main(int argc, char* argv[]) serverApp = packetSinkHelper.Install(serverNodes.get()); streamNumber += packetSinkHelper.AssignStreams(serverNodes.get(), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); for (std::size_t i = 0; i < nStations; i++) { @@ -451,14 +451,14 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = onoff.Install(clientNodes.Get(i)); streamNumber += onoff.AssignStreams(clientNodes.Get(i), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } } Simulator::Schedule(Seconds(0), &Ipv4GlobalRoutingHelper::PopulateRoutingTables); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); // When multiple stations are used, there are chances that association requests diff --git a/examples/wireless/wifi-ht-network.cc b/examples/wireless/wifi-ht-network.cc index 37a625ec1..afb4d05ec 100644 --- a/examples/wireless/wifi-ht-network.cc +++ b/examples/wireless/wifi-ht-network.cc @@ -278,8 +278,8 @@ main(int argc, char* argv[]) serverApp = server.Install(wifiStaNode.Get(0)); streamNumber += server.AssignStreams(wifiStaNode.Get(0), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / maxLoad; UdpClientHelper client(staNodeInterface.GetAddress(0), port); @@ -289,8 +289,8 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); streamNumber += client.AssignStreams(wifiApNode.Get(0), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } else { @@ -302,8 +302,8 @@ main(int argc, char* argv[]) streamNumber += packetSinkHelper.AssignStreams(wifiStaNode.Get(0), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny()); onoff.SetAttribute("OnTime", @@ -318,13 +318,13 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = onoff.Install(wifiApNode.Get(0)); streamNumber += onoff.AssignStreams(wifiApNode.Get(0), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); auto rxBytes = 0.0; diff --git a/examples/wireless/wifi-mixed-network.cc b/examples/wireless/wifi-mixed-network.cc index f48f49246..2ea312dad 100644 --- a/examples/wireless/wifi-mixed-network.cc +++ b/examples/wireless/wifi-mixed-network.cc @@ -265,8 +265,8 @@ Experiment::Run(Parameters params) uint16_t port = 9; UdpServerHelper server(port); ApplicationContainer serverApp = server.Install(wifiApNode); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); UdpClientHelper client(ApInterface.GetAddress(0), port); client.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -286,10 +286,10 @@ Experiment::Run(Parameters params) { clientApps.Add(client.Install(wifiNStaNodes)); } - clientApps.Start(Seconds(1.0)); - clientApps.Stop(simulationTime + Seconds(1.0)); + clientApps.Start(Seconds(1)); + clientApps.Stop(simulationTime + Seconds(1)); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); double totalPacketsThrough = DynamicCast(serverApp.Get(0))->GetReceived(); @@ -302,8 +302,8 @@ Experiment::Run(Parameters params) PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress); ApplicationContainer serverApp = packetSinkHelper.Install(wifiApNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny()); onoff.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]")); @@ -327,10 +327,10 @@ Experiment::Run(Parameters params) { clientApps.Add(onoff.Install(wifiNStaNodes)); } - clientApps.Start(Seconds(1.0)); - clientApps.Stop(simulationTime + Seconds(1.0)); + clientApps.Start(Seconds(1)); + clientApps.Stop(simulationTime + Seconds(1)); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); double totalPacketsThrough = DynamicCast(serverApp.Get(0))->GetTotalRx(); diff --git a/examples/wireless/wifi-multi-tos.cc b/examples/wireless/wifi-multi-tos.cc index 66d2aa3cb..8a9f46619 100644 --- a/examples/wireless/wifi-multi-tos.cc +++ b/examples/wireless/wifi-multi-tos.cc @@ -154,14 +154,14 @@ main(int argc, char* argv[]) } } - sinkApplications.Start(Seconds(0.0)); - sinkApplications.Stop(simulationTime + Seconds(1.0)); - sourceApplications.Start(Seconds(1.0)); - sourceApplications.Stop(simulationTime + Seconds(1.0)); + sinkApplications.Start(Seconds(0)); + sinkApplications.Stop(simulationTime + Seconds(1)); + sourceApplications.Start(Seconds(1)); + sourceApplications.Stop(simulationTime + Seconds(1)); Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); double throughput = 0; diff --git a/examples/wireless/wifi-power-adaptation-interference.cc b/examples/wireless/wifi-power-adaptation-interference.cc index 59570e693..7a65ca567 100644 --- a/examples/wireless/wifi-power-adaptation-interference.cc +++ b/examples/wireless/wifi-power-adaptation-interference.cc @@ -578,8 +578,8 @@ main(int argc, char* argv[]) OnOffHelper onoff("ns3::UdpSocketFactory", InetSocketAddress(sinkAddress, port)); onoff.SetConstantRate(DataRate("54Mb/s"), packetSize); - onoff.SetAttribute("StartTime", TimeValue(Seconds(0.0))); - onoff.SetAttribute("StopTime", TimeValue(Seconds(100.0))); + onoff.SetAttribute("StartTime", TimeValue(Seconds(0))); + onoff.SetAttribute("StopTime", TimeValue(Seconds(100))); ApplicationContainer apps_source = onoff.Install(wifiApNodes.Get(0)); PacketSinkHelper sink1("ns3::UdpSocketFactory", InetSocketAddress(sinkAddress1, port)); @@ -587,8 +587,8 @@ main(int argc, char* argv[]) OnOffHelper onoff1("ns3::UdpSocketFactory", InetSocketAddress(sinkAddress1, port)); onoff1.SetConstantRate(DataRate("54Mb/s"), packetSize); - onoff1.SetAttribute("StartTime", TimeValue(Seconds(0.0))); - onoff1.SetAttribute("StopTime", TimeValue(Seconds(100.0))); + onoff1.SetAttribute("StartTime", TimeValue(Seconds(0))); + onoff1.SetAttribute("StopTime", TimeValue(Seconds(100))); apps_source.Add(onoff1.Install(wifiApNodes.Get(1))); apps_sink.Start(Seconds(0.5)); diff --git a/examples/wireless/wifi-simple-adhoc-grid.cc b/examples/wireless/wifi-simple-adhoc-grid.cc index 630e2ef96..5a1884e92 100644 --- a/examples/wireless/wifi-simple-adhoc-grid.cc +++ b/examples/wireless/wifi-simple-adhoc-grid.cc @@ -259,7 +259,7 @@ main(int argc, char* argv[]) } // Give OLSR time to converge-- 30 seconds perhaps - Simulator::Schedule(Seconds(30.0), + Simulator::Schedule(Seconds(30), &GenerateTraffic, source, packetSize, @@ -270,7 +270,7 @@ main(int argc, char* argv[]) NS_LOG_UNCOND("Testing from node " << sourceNode << " to " << sinkNode << " with grid distance " << distance); - Simulator::Stop(Seconds(33.0)); + Simulator::Stop(Seconds(33)); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/wireless/wifi-simple-adhoc.cc b/examples/wireless/wifi-simple-adhoc.cc index 8dc13ee4e..b00fef74f 100644 --- a/examples/wireless/wifi-simple-adhoc.cc +++ b/examples/wireless/wifi-simple-adhoc.cc @@ -189,7 +189,7 @@ main(int argc, char* argv[]) NS_LOG_UNCOND("Testing " << numPackets << " packets sent with receiver rss " << rss); Simulator::ScheduleWithContext(source->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &GenerateTraffic, source, packetSize, diff --git a/examples/wireless/wifi-simple-ht-hidden-stations.cc b/examples/wireless/wifi-simple-ht-hidden-stations.cc index bc2f6f080..8b283d760 100644 --- a/examples/wireless/wifi-simple-ht-hidden-stations.cc +++ b/examples/wireless/wifi-simple-ht-hidden-stations.cc @@ -166,8 +166,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper server(port); ApplicationContainer serverApp = server.Install(wifiApNode); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); streamNumber += server.AssignStreams(wifiApNode, streamNumber); UdpClientHelper client(ApInterface.GetAddress(0), port); @@ -177,8 +177,8 @@ main(int argc, char* argv[]) // Saturated UDP traffic from stations to AP ApplicationContainer clientApp1 = client.Install(wifiStaNodes); - clientApp1.Start(Seconds(1.0)); - clientApp1.Stop(simulationTime + Seconds(1.0)); + clientApp1.Start(Seconds(1)); + clientApp1.Stop(simulationTime + Seconds(1)); streamNumber += client.AssignStreams(wifiStaNodes, streamNumber); phy.EnablePcap("SimpleHtHiddenStations_Ap", apDevice.Get(0)); @@ -188,7 +188,7 @@ main(int argc, char* argv[]) AsciiTraceHelper ascii; phy.EnableAsciiAll(ascii.CreateFileStream("SimpleHtHiddenStations.tr")); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); diff --git a/examples/wireless/wifi-simple-infra.cc b/examples/wireless/wifi-simple-infra.cc index 1ccbad06c..fa6ed0d00 100644 --- a/examples/wireless/wifi-simple-infra.cc +++ b/examples/wireless/wifi-simple-infra.cc @@ -229,14 +229,14 @@ main(int argc, char* argv[]) std::cout << "Testing " << numPackets << " packets sent with receiver rss " << rss << std::endl; Simulator::ScheduleWithContext(source->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &GenerateTraffic, source, packetSize, numPackets, interval); - Simulator::Stop(Seconds(30.0)); + Simulator::Stop(Seconds(30)); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/wireless/wifi-sleep.cc b/examples/wireless/wifi-sleep.cc index 80317b1db..4ed1ce1eb 100644 --- a/examples/wireless/wifi-sleep.cc +++ b/examples/wireless/wifi-sleep.cc @@ -245,7 +245,7 @@ main(int argc, char* argv[]) Config::Connect("/NodeList/0/DeviceList/*/Phy/State/State", MakeCallback(&PhyStateTrace<0>)); Config::Connect("/NodeList/1/DeviceList/*/Phy/State/State", MakeCallback(&PhyStateTrace<1>)); - Simulator::Stop(duration + Seconds(1.0)); + Simulator::Stop(duration + Seconds(1)); Simulator::Run(); Simulator::Destroy(); diff --git a/examples/wireless/wifi-spectrum-per-example.cc b/examples/wireless/wifi-spectrum-per-example.cc index 1736e06be..377e104c1 100644 --- a/examples/wireless/wifi-spectrum-per-example.cc +++ b/examples/wireless/wifi-spectrum-per-example.cc @@ -443,8 +443,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper server(port); serverApp = server.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / (datarate * 1e6); UdpClientHelper client(staNodeInterface.GetAddress(0), port); @@ -452,8 +452,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(Seconds(packetInterval))); client.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } else { @@ -462,8 +462,8 @@ main(int argc, char* argv[]) Address localAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress); serverApp = packetSinkHelper.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny()); onoff.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]")); @@ -473,8 +473,8 @@ main(int argc, char* argv[]) AddressValue remoteAddress(InetSocketAddress(staNodeInterface.GetAddress(0), port)); onoff.SetAttribute("Remote", remoteAddress); ApplicationContainer clientApp = onoff.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } Config::ConnectWithoutContext("/NodeList/0/DeviceList/*/Phy/MonitorSnifferRx", @@ -495,7 +495,7 @@ main(int argc, char* argv[]) g_noiseDbmAvg = 0; g_samples = 0; - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); auto throughput = 0.0; diff --git a/examples/wireless/wifi-spectrum-per-interference.cc b/examples/wireless/wifi-spectrum-per-interference.cc index ebd34563c..6af2b7bd3 100644 --- a/examples/wireless/wifi-spectrum-per-interference.cc +++ b/examples/wireless/wifi-spectrum-per-interference.cc @@ -498,8 +498,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper server(port); serverApp = server.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / (datarate * 1e6); UdpClientHelper client(staNodeInterface.GetAddress(0), port); @@ -507,8 +507,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(Seconds(packetInterval))); client.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } else { @@ -517,8 +517,8 @@ main(int argc, char* argv[]) Address localAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", localAddress); serverApp = packetSinkHelper.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny()); onoff.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]")); @@ -528,8 +528,8 @@ main(int argc, char* argv[]) AddressValue remoteAddress(InetSocketAddress(staNodeInterface.GetAddress(0), port)); onoff.SetAttribute("Remote", remoteAddress); ApplicationContainer clientApp = onoff.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } // Configure waveform generator @@ -593,7 +593,7 @@ main(int argc, char* argv[]) "Error: Wi-Fi nodes must be tuned to 5190 MHz to match the waveform generator"); } - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); auto throughput = 0.0; diff --git a/examples/wireless/wifi-spectrum-saturation-example.cc b/examples/wireless/wifi-spectrum-saturation-example.cc index f2fd34cff..82ef4fb1a 100644 --- a/examples/wireless/wifi-spectrum-saturation-example.cc +++ b/examples/wireless/wifi-spectrum-saturation-example.cc @@ -577,8 +577,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper server(port); ApplicationContainer serverApp = server.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / (datarate * 1e6); UdpClientHelper client(staNodeInterface.GetAddress(0), port); @@ -586,8 +586,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(Seconds(packetInterval))); client.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); if (enablePcap) { @@ -600,7 +600,7 @@ main(int argc, char* argv[]) phy.EnablePcap(ss.str(), apDevice); } - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); double totalPacketsThrough = DynamicCast(serverApp.Get(0))->GetReceived(); diff --git a/examples/wireless/wifi-tcp.cc b/examples/wireless/wifi-tcp.cc index a7040beee..e2a0ac164 100644 --- a/examples/wireless/wifi-tcp.cc +++ b/examples/wireless/wifi-tcp.cc @@ -170,8 +170,8 @@ main(int argc, char* argv[]) ApplicationContainer serverApp = server.Install(staWifiNode); /* Start Applications */ - sinkApp.Start(Seconds(0.0)); - serverApp.Start(Seconds(1.0)); + sinkApp.Start(Seconds(0)); + serverApp.Start(Seconds(1)); Simulator::Schedule(Seconds(1.1), &CalculateThroughput); /* Enable Traces */ @@ -183,7 +183,7 @@ main(int argc, char* argv[]) } /* Start Simulation */ - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); auto averageThroughput = diff --git a/examples/wireless/wifi-timing-attributes.cc b/examples/wireless/wifi-timing-attributes.cc index 63e169b28..d86e0dbaa 100644 --- a/examples/wireless/wifi-timing-attributes.cc +++ b/examples/wireless/wifi-timing-attributes.cc @@ -131,8 +131,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper server(port); ApplicationContainer serverApp = server.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); UdpClientHelper client(staNodeInterface.GetAddress(0), port); client.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -140,14 +140,14 @@ main(int argc, char* argv[]) client.SetAttribute("PacketSize", UintegerValue(1472)); // bytes ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); // Populate routing table Ipv4GlobalRoutingHelper::PopulateRoutingTables(); // Set simulation time and launch simulation - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); // Get and print results diff --git a/examples/wireless/wifi-txop-aggregation.cc b/examples/wireless/wifi-txop-aggregation.cc index 9f72e6807..381e7dd3a 100644 --- a/examples/wireless/wifi-txop-aggregation.cc +++ b/examples/wireless/wifi-txop-aggregation.cc @@ -339,8 +339,8 @@ main(int argc, char* argv[]) uint16_t port = 9; UdpServerHelper serverA(port); ApplicationContainer serverAppA = serverA.Install(wifiStaNodes.Get(0)); - serverAppA.Start(Seconds(0.0)); - serverAppA.Stop(simulationTime + Seconds(1.0)); + serverAppA.Start(Seconds(0)); + serverAppA.Stop(simulationTime + Seconds(1)); UdpClientHelper clientA(StaInterfaceA.GetAddress(0), port); clientA.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -348,13 +348,13 @@ main(int argc, char* argv[]) clientA.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppA = clientA.Install(wifiApNodes.Get(0)); - clientAppA.Start(Seconds(1.0)); - clientAppA.Stop(simulationTime + Seconds(1.0)); + clientAppA.Start(Seconds(1)); + clientAppA.Stop(simulationTime + Seconds(1)); UdpServerHelper serverB(port); ApplicationContainer serverAppB = serverB.Install(wifiStaNodes.Get(1)); - serverAppB.Start(Seconds(0.0)); - serverAppB.Stop(simulationTime + Seconds(1.0)); + serverAppB.Start(Seconds(0)); + serverAppB.Stop(simulationTime + Seconds(1)); UdpClientHelper clientB(StaInterfaceB.GetAddress(0), port); clientB.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -362,13 +362,13 @@ main(int argc, char* argv[]) clientB.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppB = clientB.Install(wifiApNodes.Get(1)); - clientAppB.Start(Seconds(1.0)); - clientAppB.Stop(simulationTime + Seconds(1.0)); + clientAppB.Start(Seconds(1)); + clientAppB.Stop(simulationTime + Seconds(1)); UdpServerHelper serverC(port); ApplicationContainer serverAppC = serverC.Install(wifiStaNodes.Get(2)); - serverAppC.Start(Seconds(0.0)); - serverAppC.Stop(simulationTime + Seconds(1.0)); + serverAppC.Start(Seconds(0)); + serverAppC.Stop(simulationTime + Seconds(1)); UdpClientHelper clientC(StaInterfaceC.GetAddress(0), port); clientC.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -376,13 +376,13 @@ main(int argc, char* argv[]) clientC.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppC = clientC.Install(wifiApNodes.Get(2)); - clientAppC.Start(Seconds(1.0)); - clientAppC.Stop(simulationTime + Seconds(1.0)); + clientAppC.Start(Seconds(1)); + clientAppC.Stop(simulationTime + Seconds(1)); UdpServerHelper serverD(port); ApplicationContainer serverAppD = serverD.Install(wifiStaNodes.Get(3)); - serverAppD.Start(Seconds(0.0)); - serverAppD.Stop(simulationTime + Seconds(1.0)); + serverAppD.Start(Seconds(0)); + serverAppD.Stop(simulationTime + Seconds(1)); UdpClientHelper clientD(StaInterfaceD.GetAddress(0), port); clientD.SetAttribute("MaxPackets", UintegerValue(4294967295U)); @@ -390,8 +390,8 @@ main(int argc, char* argv[]) clientD.SetAttribute("PacketSize", UintegerValue(payloadSize)); ApplicationContainer clientAppD = clientD.Install(wifiApNodes.Get(3)); - clientAppD.Start(Seconds(1.0)); - clientAppD.Stop(simulationTime + Seconds(1.0)); + clientAppD.Start(Seconds(1)); + clientAppD.Stop(simulationTime + Seconds(1)); if (enablePcap) { @@ -405,7 +405,7 @@ main(int argc, char* argv[]) phy.EnablePcap("STA_D", staDeviceD.Get(0)); } - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); // Show results diff --git a/examples/wireless/wifi-vht-network.cc b/examples/wireless/wifi-vht-network.cc index 8babedc69..82bc4eb9f 100644 --- a/examples/wireless/wifi-vht-network.cc +++ b/examples/wireless/wifi-vht-network.cc @@ -311,8 +311,8 @@ main(int argc, char* argv[]) serverApp = server.Install(wifiStaNode.Get(0)); streamNumber += server.AssignStreams(wifiStaNode.Get(0), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); const auto packetInterval = payloadSize * 8.0 / maxLoad; UdpClientHelper client(staNodeInterface.GetAddress(0), port); @@ -322,8 +322,8 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = client.Install(wifiApNode.Get(0)); streamNumber += client.AssignStreams(wifiApNode.Get(0), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } else { @@ -335,8 +335,8 @@ main(int argc, char* argv[]) streamNumber += packetSinkHelper.AssignStreams(wifiStaNode.Get(0), streamNumber); - serverApp.Start(Seconds(0.0)); - serverApp.Stop(simulationTime + Seconds(1.0)); + serverApp.Start(Seconds(0)); + serverApp.Stop(simulationTime + Seconds(1)); OnOffHelper onoff("ns3::TcpSocketFactory", Ipv4Address::GetAny()); onoff.SetAttribute("OnTime", @@ -351,13 +351,13 @@ main(int argc, char* argv[]) ApplicationContainer clientApp = onoff.Install(wifiApNode.Get(0)); streamNumber += onoff.AssignStreams(wifiApNode.Get(0), streamNumber); - clientApp.Start(Seconds(1.0)); - clientApp.Stop(simulationTime + Seconds(1.0)); + clientApp.Start(Seconds(1)); + clientApp.Stop(simulationTime + Seconds(1)); } Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(simulationTime + Seconds(1.0)); + Simulator::Stop(simulationTime + Seconds(1)); Simulator::Run(); auto rxBytes = 0.0; diff --git a/examples/wireless/wifi-wired-bridging.cc b/examples/wireless/wifi-wired-bridging.cc index 6dd7a9547..1990f1678 100644 --- a/examples/wireless/wifi-wired-bridging.cc +++ b/examples/wireless/wifi-wired-bridging.cc @@ -181,7 +181,7 @@ main(int argc, char* argv[]) onoff.SetConstantRate(DataRate("500kb/s")); ApplicationContainer apps = onoff.Install(staNodes[0].Get(0)); apps.Start(Seconds(0.5)); - apps.Stop(Seconds(3.0)); + apps.Stop(Seconds(3)); wifiPhy.EnablePcap("wifi-wired-bridging", apDevices[0]); wifiPhy.EnablePcap("wifi-wired-bridging", apDevices[1]); @@ -192,7 +192,7 @@ main(int argc, char* argv[]) MobilityHelper::EnableAsciiAll(ascii.CreateFileStream("wifi-wired-bridging.mob")); } - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/aodv/test/bug-772.cc b/src/aodv/test/bug-772.cc index ef1241ed9..4517ec656 100644 --- a/src/aodv/test/bug-772.cc +++ b/src/aodv/test/bug-772.cc @@ -184,7 +184,7 @@ Bug772ChainTest::CreateDevices() m_sendSocket->Connect(InetSocketAddress(interfaces.GetAddress(m_size - 1), m_port)); m_sendSocket->SetAllowBroadcast(true); Simulator::ScheduleWithContext(m_sendSocket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &Bug772ChainTest::SendData, this, m_sendSocket); diff --git a/src/aodv/test/loopback.cc b/src/aodv/test/loopback.cc index 8e509748e..26c4664d7 100644 --- a/src/aodv/test/loopback.cc +++ b/src/aodv/test/loopback.cc @@ -107,7 +107,7 @@ LoopbackTestCase::SendData(Ptr socket) socket->SendTo(Create(123), 0, realTo); Simulator::ScheduleWithContext(socket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &LoopbackTestCase::SendData, this, socket); @@ -158,7 +158,7 @@ LoopbackTestCase::DoRun() m_txSocket = socketFactory->CreateSocket(); Simulator::ScheduleWithContext(m_txSocket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &LoopbackTestCase::SendData, this, m_txSocket); diff --git a/src/applications/model/udp-client.cc b/src/applications/model/udp-client.cc index 00ac05f97..3cc9484b3 100644 --- a/src/applications/model/udp-client.cc +++ b/src/applications/model/udp-client.cc @@ -46,7 +46,7 @@ UdpClient::GetTypeId() MakeUintegerChecker()) .AddAttribute("Interval", "The time to wait between packets", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&UdpClient::m_interval), MakeTimeChecker()) .AddAttribute("RemoteAddress", @@ -226,7 +226,7 @@ UdpClient::StartApplication() m_peerString = peerAddressStringStream.str(); #endif // NS3_LOG_ENABLE - m_sendEvent = Simulator::Schedule(Seconds(0.0), &UdpClient::Send, this); + m_sendEvent = Simulator::Schedule(Seconds(0), &UdpClient::Send, this); } void diff --git a/src/applications/model/udp-echo-client.cc b/src/applications/model/udp-echo-client.cc index 8ea2f9a50..611731923 100644 --- a/src/applications/model/udp-echo-client.cc +++ b/src/applications/model/udp-echo-client.cc @@ -38,7 +38,7 @@ UdpEchoClient::GetTypeId() MakeUintegerChecker()) .AddAttribute("Interval", "The time to wait between packets", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&UdpEchoClient::m_interval), MakeTimeChecker()) .AddAttribute( diff --git a/src/applications/test/bulk-send-application-test-suite.cc b/src/applications/test/bulk-send-application-test-suite.cc index 28155d468..91261281e 100644 --- a/src/applications/test/bulk-send-application-test-suite.cc +++ b/src/applications/test/bulk-send-application-test-suite.cc @@ -99,13 +99,13 @@ BulkSendBasicTestCase::DoRun() BulkSendHelper sourceHelper("ns3::TcpSocketFactory", InetSocketAddress(i.GetAddress(1), port)); sourceHelper.SetAttribute("MaxBytes", UintegerValue(300000)); ApplicationContainer sourceApp = sourceHelper.Install(nodes.Get(0)); - sourceApp.Start(Seconds(0.0)); - sourceApp.Stop(Seconds(10.0)); + sourceApp.Start(Seconds(0)); + sourceApp.Stop(Seconds(10)); PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer sinkApp = sinkHelper.Install(nodes.Get(1)); - sinkApp.Start(Seconds(0.0)); - sinkApp.Stop(Seconds(10.0)); + sinkApp.Start(Seconds(0)); + sinkApp.Stop(Seconds(10)); Ptr source = DynamicCast(sourceApp.Get(0)); Ptr sink = DynamicCast(sinkApp.Get(0)); @@ -226,14 +226,14 @@ BulkSendSeqTsSizeTestCase::DoRun() sourceHelper.SetAttribute("MaxBytes", UintegerValue(300000)); sourceHelper.SetAttribute("EnableSeqTsSizeHeader", BooleanValue(true)); ApplicationContainer sourceApp = sourceHelper.Install(nodes.Get(0)); - sourceApp.Start(Seconds(0.0)); - sourceApp.Stop(Seconds(10.0)); + sourceApp.Start(Seconds(0)); + sourceApp.Stop(Seconds(10)); PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); sinkHelper.SetAttribute("EnableSeqTsSizeHeader", BooleanValue(true)); ApplicationContainer sinkApp = sinkHelper.Install(nodes.Get(1)); - sinkApp.Start(Seconds(0.0)); - sinkApp.Stop(Seconds(10.0)); + sinkApp.Start(Seconds(0)); + sinkApp.Stop(Seconds(10)); Ptr source = DynamicCast(sourceApp.Get(0)); Ptr sink = DynamicCast(sinkApp.Get(0)); diff --git a/src/applications/test/three-gpp-http-client-server-test.cc b/src/applications/test/three-gpp-http-client-server-test.cc index db3365e72..f05d219c2 100644 --- a/src/applications/test/three-gpp-http-client-server-test.cc +++ b/src/applications/test/three-gpp-http-client-server-test.cc @@ -563,7 +563,7 @@ ThreeGppHttpObjectTestCase::DoRun() MakeCallback(&ThreeGppHttpObjectTestCase::ClientRxRttCallback, this)); NS_ASSERT(traceSourceConnected); - Simulator::Schedule(Seconds(1.0), &ThreeGppHttpObjectTestCase::ProgressCallback, this); + Simulator::Schedule(Seconds(1), &ThreeGppHttpObjectTestCase::ProgressCallback, this); /* * Here we don't set the simulation stop time. During the run, the simulation @@ -707,7 +707,7 @@ ThreeGppHttpObjectTestCase::ServerRxCallback(Ptr packet, 22, "Error finding ThreeGppHttpHeader in a packet received by the server"); NS_TEST_ASSERT_MSG_GT(httpHeader.GetClientTs(), - Seconds(0.0), + Seconds(0), "Request object's client TS is unexpectedly non-positive"); m_requestObjectTracker.PartReceived(packet->GetSize()); @@ -755,10 +755,10 @@ ThreeGppHttpObjectTestCase::ClientRxMainObjectCallback(Ptr sink1 = DynamicCast(apps.Get(0)); diff --git a/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc b/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc index ffe9fefee..90b9492fe 100644 --- a/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc +++ b/src/buildings/model/random-walk-2d-outdoor-mobility-model.cc @@ -45,7 +45,7 @@ RandomWalk2dOutdoorMobilityModel::GetTypeId() MakeRectangleChecker()) .AddAttribute("Time", "Change current direction and speed after moving for this delay.", - TimeValue(Seconds(20.0)), + TimeValue(Seconds(20)), MakeTimeAccessor(&RandomWalk2dOutdoorMobilityModel::m_modeTime), MakeTimeChecker()) .AddAttribute("Distance", diff --git a/src/click/examples/nsclick-defines.cc b/src/click/examples/nsclick-defines.cc index e98aca6be..be657768a 100644 --- a/src/click/examples/nsclick-defines.cc +++ b/src/click/examples/nsclick-defines.cc @@ -50,7 +50,7 @@ main(int argc, char* argv[]) // Now, do the actual simulation. // NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/src/click/examples/nsclick-raw-wlan.cc b/src/click/examples/nsclick-raw-wlan.cc index 48e90a435..73641c593 100644 --- a/src/click/examples/nsclick-raw-wlan.cc +++ b/src/click/examples/nsclick-raw-wlan.cc @@ -115,8 +115,8 @@ main(int argc, char* argv[]) Address LocalAddress(InetSocketAddress(Ipv4Address::GetAny(), 50000)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", LocalAddress); ApplicationContainer recvapp = packetSinkHelper.Install(wifiNodes.Get(1)); - recvapp.Start(Seconds(5.0)); - recvapp.Stop(Seconds(10.0)); + recvapp.Start(Seconds(5)); + recvapp.Stop(Seconds(10)); OnOffHelper onOffHelper("ns3::TcpSocketFactory", Address()); onOffHelper.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]")); @@ -128,13 +128,13 @@ main(int argc, char* argv[]) onOffHelper.SetAttribute("Remote", remoteAddress); appcont.Add(onOffHelper.Install(wifiNodes.Get(0))); - appcont.Start(Seconds(5.0)); - appcont.Stop(Seconds(10.0)); + appcont.Start(Seconds(5)); + appcont.Stop(Seconds(10)); // For tracing wifiPhy.EnablePcap("nsclick-raw-wlan", wifiDevices); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/click/examples/nsclick-routing.cc b/src/click/examples/nsclick-routing.cc index 1c915cff4..ae42e0115 100644 --- a/src/click/examples/nsclick-routing.cc +++ b/src/click/examples/nsclick-routing.cc @@ -90,8 +90,8 @@ main(int argc, char* argv[]) uint16_t port = 4000; UdpServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(2)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // // Create one UdpClient application to send UDP datagrams from node zero to @@ -105,8 +105,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(MaxPacketSize)); apps = client.Install(NodeContainer(n.Get(0))); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); csma.EnablePcap("nsclick-routing", d01, false); csma.EnablePcap("nsclick-routing", d12, false); @@ -115,7 +115,7 @@ main(int argc, char* argv[]) // Now, do the actual simulation. // NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/src/click/examples/nsclick-simple-lan.cc b/src/click/examples/nsclick-simple-lan.cc index 55936d31b..a65134665 100644 --- a/src/click/examples/nsclick-simple-lan.cc +++ b/src/click/examples/nsclick-simple-lan.cc @@ -69,8 +69,8 @@ main(int argc, char* argv[]) Address LocalAddress(InetSocketAddress(Ipv4Address::GetAny(), 50000)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", LocalAddress); ApplicationContainer recvapp = packetSinkHelper.Install(csmaNodes.Get(1)); - recvapp.Start(Seconds(5.0)); - recvapp.Stop(Seconds(10.0)); + recvapp.Start(Seconds(5)); + recvapp.Stop(Seconds(10)); OnOffHelper onOffHelper("ns3::TcpSocketFactory", Address()); onOffHelper.SetAttribute("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=1]")); @@ -82,13 +82,13 @@ main(int argc, char* argv[]) onOffHelper.SetAttribute("Remote", remoteAddress); appcont.Add(onOffHelper.Install(csmaNodes.Get(0))); - appcont.Start(Seconds(5.0)); - appcont.Stop(Seconds(10.0)); + appcont.Start(Seconds(5)); + appcont.Stop(Seconds(10)); // For tracing csma.EnablePcap("nsclick-simple-lan", csmaDevices, false); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/click/examples/nsclick-simple-lan.py b/src/click/examples/nsclick-simple-lan.py index fff3335c7..1e010b3d7 100644 --- a/src/click/examples/nsclick-simple-lan.py +++ b/src/click/examples/nsclick-simple-lan.py @@ -51,8 +51,8 @@ ipv4.Assign(csmaDevices) LocalAddress = ns.InetSocketAddress(ns.Ipv4Address.GetAny(), 50000).ConvertTo() packetSinkHelper = ns.PacketSinkHelper("ns3::TcpSocketFactory", LocalAddress) recvapp = packetSinkHelper.Install(csmaNodes.Get(1)) -recvapp.Start(ns.Seconds(5.0)) -recvapp.Stop(ns.Seconds(10.0)) +recvapp.Start(ns.Seconds(5)) +recvapp.Stop(ns.Seconds(10)) onOffHelper = ns.OnOffHelper("ns3::TcpSocketFactory", ns.Address()) onOffHelper.SetAttribute("OnTime", ns.StringValue("ns3::ConstantRandomVariable[Constant=1]")) @@ -64,13 +64,13 @@ remoteAddress = ns.InetSocketAddress(ns.Ipv4Address("172.16.1.2"), 50000).Conver onOffHelper.SetAttribute("Remote", ns.AddressValue(remoteAddress)) appcont.Add(onOffHelper.Install(csmaNodes.Get(0))) -appcont.Start(ns.Seconds(5.0)) -appcont.Stop(ns.Seconds(10.0)) +appcont.Start(ns.Seconds(5)) +appcont.Stop(ns.Seconds(10)) # For tracing csma.EnablePcap("nsclick-simple-lan", csmaDevices, False) -ns.Simulator.Stop(ns.Seconds(20.0)) +ns.Simulator.Stop(ns.Seconds(20)) ns.Simulator.Run() ns.Simulator.Destroy() diff --git a/src/click/examples/nsclick-udp-client-server-csma.cc b/src/click/examples/nsclick-udp-client-server-csma.cc index ec13e2401..501e021e0 100644 --- a/src/click/examples/nsclick-udp-client-server-csma.cc +++ b/src/click/examples/nsclick-udp-client-server-csma.cc @@ -90,8 +90,8 @@ main(int argc, char* argv[]) uint16_t port = 4000; UdpServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // // Create one UdpClient application to send UDP datagrams from node zero to @@ -105,8 +105,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(MaxPacketSize)); apps = client.Install(NodeContainer(n.Get(0), n.Get(2))); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); csma.EnablePcap("nsclick-udp-client-server-csma", d, false); @@ -114,7 +114,7 @@ main(int argc, char* argv[]) // Now, do the actual simulation. // NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/src/click/examples/nsclick-udp-client-server-wifi.cc b/src/click/examples/nsclick-udp-client-server-wifi.cc index 07008331f..e041d271f 100644 --- a/src/click/examples/nsclick-udp-client-server-wifi.cc +++ b/src/click/examples/nsclick-udp-client-server-wifi.cc @@ -163,8 +163,8 @@ main(int argc, char* argv[]) uint16_t port = 4000; UdpServerHelper server(port); ApplicationContainer apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // // Create one UdpClient application to send UDP datagrams from node zero to @@ -178,8 +178,8 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(MaxPacketSize)); apps = client.Install(NodeContainer(n.Get(0), n.Get(2))); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); wifiPhy.EnablePcap("nsclick-udp-client-server-wifi", d); @@ -198,7 +198,7 @@ main(int argc, char* argv[]) // Now, do the actual simulation. // NS_LOG_INFO("Run Simulation."); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/src/core/examples/main-test-sync.cc b/src/core/examples/main-test-sync.cc index 8712eb8d2..80a6123cf 100644 --- a/src/core/examples/main-test-sync.cc +++ b/src/core/examples/main-test-sync.cc @@ -87,7 +87,7 @@ FakeNetDevice::Doit3() // Exercise the realtime relative now path // Simulator::ScheduleWithContext(Simulator::NO_CONTEXT, - Seconds(0.0), + Seconds(0), MakeEvent(&inserted_function)); std::this_thread::sleep_for(std::chrono::milliseconds(1)); } @@ -112,7 +112,7 @@ test() // // Make sure ScheduleNow works when the system isn't running // - Simulator::ScheduleWithContext(0xffffffff, Seconds(0.0), MakeEvent(&first_function)); + Simulator::ScheduleWithContext(0xffffffff, Seconds(0), MakeEvent(&first_function)); // // drive the progression of m_currentTs at a ten millisecond rate from the main thread @@ -124,7 +124,7 @@ test() std::thread st3 = std::thread(&FakeNetDevice::Doit3, &fnd); - Simulator::Stop(Seconds(15.0)); + Simulator::Stop(Seconds(15)); Simulator::Run(); if (st3.joinable()) diff --git a/src/core/examples/sample-simulator.cc b/src/core/examples/sample-simulator.cc index 0df364e91..622ea1bc3 100644 --- a/src/core/examples/sample-simulator.cc +++ b/src/core/examples/sample-simulator.cc @@ -45,7 +45,7 @@ class MyModel void MyModel::Start() { - Simulator::Schedule(Seconds(10.0), &MyModel::HandleEvent, this, Simulator::Now().GetSeconds()); + Simulator::Schedule(Seconds(10), &MyModel::HandleEvent, this, Simulator::Now().GetSeconds()); } void @@ -98,14 +98,14 @@ main(int argc, char* argv[]) v->SetAttribute("Min", DoubleValue(10)); v->SetAttribute("Max", DoubleValue(20)); - Simulator::Schedule(Seconds(10.0), &ExampleFunction, &model); + Simulator::Schedule(Seconds(10), &ExampleFunction, &model); Simulator::Schedule(Seconds(v->GetValue()), &RandomFunction); - EventId id = Simulator::Schedule(Seconds(30.0), &CancelledEvent); + EventId id = Simulator::Schedule(Seconds(30), &CancelledEvent); Simulator::Cancel(id); - Simulator::Schedule(Seconds(25.0), []() { + Simulator::Schedule(Seconds(25), []() { std::cout << "Code within a lambda expression at time " << Simulator::Now().As(Time::S) << std::endl; }); diff --git a/src/core/examples/sample-simulator.py b/src/core/examples/sample-simulator.py index d6838b0af..3af85207a 100755 --- a/src/core/examples/sample-simulator.py +++ b/src/core/examples/sample-simulator.py @@ -113,13 +113,13 @@ def main(argv): v.SetAttribute("Max", ns.DoubleValue(20)) ev = ns.cppyy.gbl.ExampleFunctionEvent(model) - ns.Simulator.Schedule(ns.Seconds(10.0), ev) + ns.Simulator.Schedule(ns.Seconds(10), ev) ev2 = ns.cppyy.gbl.RandomFunctionEvent(model) ns.Simulator.Schedule(ns.Seconds(v.GetValue()), ev2) ev3 = ns.cppyy.gbl.CancelledFunctionEvent() - id = ns.Simulator.Schedule(ns.Seconds(30.0), ev3) + id = ns.Simulator.Schedule(ns.Seconds(30), ev3) ns.Simulator.Cancel(id) ns.Simulator.Run() diff --git a/src/core/model/show-progress.h b/src/core/model/show-progress.h index 0e893fd7e..499ca75e1 100644 --- a/src/core/model/show-progress.h +++ b/src/core/model/show-progress.h @@ -87,7 +87,7 @@ class ShowProgress * \param [in] interval The target wallclock interval to show progress. * \param [in] os The stream to print on. */ - ShowProgress(const Time interval = Seconds(1.0), std::ostream& os = std::cout); + ShowProgress(const Time interval = Seconds(1), std::ostream& os = std::cout); /** Destructor. */ ~ShowProgress(); diff --git a/src/core/test/simulator-test-suite.cc b/src/core/test/simulator-test-suite.cc index 87be9075a..081aea03f 100644 --- a/src/core/test/simulator-test-suite.cc +++ b/src/core/test/simulator-test-suite.cc @@ -368,17 +368,17 @@ void SimulatorTemplateTestCase::DoRun() { // Test schedule of const methods - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar0c, this); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar1c, this, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar2c, this, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar3c, this, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar4c, this, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar5c, this, 0, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz1c, this, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz2c, this, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz3c, this, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz4c, this, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz5c, this, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar0c, this); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar1c, this, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar2c, this, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar3c, this, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar4c, this, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar5c, this, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz1c, this, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz2c, this, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz3c, this, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz4c, this, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz5c, this, 0, 0, 0, 0, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::bar0c, this); Simulator::ScheduleNow(&SimulatorTemplateTestCase::bar1c, this, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::bar2c, this, 0, 0); @@ -401,11 +401,11 @@ SimulatorTemplateTestCase::DoRun() Simulator::ScheduleDestroy(&SimulatorTemplateTestCase::cbaz3c, this, 0, 0, 0); Simulator::ScheduleDestroy(&SimulatorTemplateTestCase::cbaz4c, this, 0, 0, 0, 0); Simulator::ScheduleDestroy(&SimulatorTemplateTestCase::cbaz5c, this, 0, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz1c, this, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz2c, this, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz3c, this, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz4c, this, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz5c, this, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz1c, this, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz2c, this, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz3c, this, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz4c, this, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz5c, this, 0, 0, 0, 0, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::baz1c, this, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::baz2c, this, 0, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::baz3c, this, 0, 0, 0); @@ -418,32 +418,32 @@ SimulatorTemplateTestCase::DoRun() Simulator::ScheduleDestroy(&SimulatorTemplateTestCase::baz5c, this, 0, 0, 0, 0, 0); // Test of schedule const methods with Ptr<> pointers - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar0c, Ptr(this)); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar1c, Ptr(this), 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar2c, Ptr(this), 0, 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar3c, Ptr(this), 0, 0, 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar4c, Ptr(this), 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar5c, Ptr(this), 0, @@ -507,17 +507,17 @@ SimulatorTemplateTestCase::DoRun() 0); // Test schedule of raw functions - Simulator::Schedule(Seconds(0.0), &foo0); - Simulator::Schedule(Seconds(0.0), &foo1, 0); - Simulator::Schedule(Seconds(0.0), &foo2, 0, 0); - Simulator::Schedule(Seconds(0.0), &foo3, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &foo4, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &foo5, 0, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &cber1, 0); - Simulator::Schedule(Seconds(0.0), &cber2, 0, 0); - Simulator::Schedule(Seconds(0.0), &cber3, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &cber4, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &cber5, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &foo0); + Simulator::Schedule(Seconds(0), &foo1, 0); + Simulator::Schedule(Seconds(0), &foo2, 0, 0); + Simulator::Schedule(Seconds(0), &foo3, 0, 0, 0); + Simulator::Schedule(Seconds(0), &foo4, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &foo5, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &cber1, 0); + Simulator::Schedule(Seconds(0), &cber2, 0, 0); + Simulator::Schedule(Seconds(0), &cber3, 0, 0, 0); + Simulator::Schedule(Seconds(0), &cber4, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &cber5, 0, 0, 0, 0, 0); Simulator::ScheduleNow(&foo0); Simulator::ScheduleNow(&foo1, 0); Simulator::ScheduleNow(&foo2, 0, 0); @@ -542,17 +542,17 @@ SimulatorTemplateTestCase::DoRun() Simulator::ScheduleDestroy(&cber5, 0, 0, 0, 0, 0); // Test schedule of normal member methods - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar0, this); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar1, this, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar2, this, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar3, this, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar4, this, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::bar5, this, 0, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz1, this, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz2, this, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz3, this, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz4, this, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::cbaz5, this, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar0, this); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar1, this, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar2, this, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar3, this, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar4, this, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar5, this, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz1, this, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz2, this, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz3, this, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz4, this, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::cbaz5, this, 0, 0, 0, 0, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::bar0, this); Simulator::ScheduleNow(&SimulatorTemplateTestCase::bar1, this, 0); Simulator::ScheduleNow(&SimulatorTemplateTestCase::bar2, this, 0, 0); @@ -577,32 +577,32 @@ SimulatorTemplateTestCase::DoRun() Simulator::ScheduleDestroy(&SimulatorTemplateTestCase::cbaz5, this, 0, 0, 0, 0, 0); // test schedule of normal methods with Ptr<> pointers - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar0, Ptr(this)); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar1, Ptr(this), 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar2, Ptr(this), 0, 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar3, Ptr(this), 0, 0, 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar4, Ptr(this), 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::bar5, Ptr(this), 0, @@ -668,16 +668,16 @@ SimulatorTemplateTestCase::DoRun() // Simulator::Schedule (Seconds (0.0), &cber1, 0.0); // This code appears to be duplicate test code. - Simulator::Schedule(Seconds(0.0), &ber1, 0); - Simulator::Schedule(Seconds(0.0), &ber2, 0, 0); - Simulator::Schedule(Seconds(0.0), &ber3, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &ber4, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &ber5, 0, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz1, this, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz2, this, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz3, this, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz4, this, 0, 0, 0, 0); - Simulator::Schedule(Seconds(0.0), &SimulatorTemplateTestCase::baz5, this, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &ber1, 0); + Simulator::Schedule(Seconds(0), &ber2, 0, 0); + Simulator::Schedule(Seconds(0), &ber3, 0, 0, 0); + Simulator::Schedule(Seconds(0), &ber4, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &ber5, 0, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz1, this, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz2, this, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz3, this, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz4, this, 0, 0, 0, 0); + Simulator::Schedule(Seconds(0), &SimulatorTemplateTestCase::baz5, this, 0, 0, 0, 0, 0); Simulator::ScheduleNow(&ber1, 0); Simulator::ScheduleNow(&ber2, 0, 0); Simulator::ScheduleNow(&ber3, 0, 0, 0); diff --git a/src/core/test/time-test-suite.cc b/src/core/test/time-test-suite.cc index c28770b34..7736716b5 100644 --- a/src/core/test/time-test-suite.cc +++ b/src/core/test/time-test-suite.cc @@ -168,11 +168,11 @@ TimeSimpleTestCase::DoRun() 10.0, Minutes(1).GetMinutes(), "is 10 really 10 ?"); - NS_TEST_ASSERT_MSG_EQ_TOL(Seconds(1.0).GetSeconds(), + NS_TEST_ASSERT_MSG_EQ_TOL(Seconds(1).GetSeconds(), 1.0, TimeStep(1).GetSeconds(), "is 1 really 1 ?"); - NS_TEST_ASSERT_MSG_EQ_TOL(Seconds(10.0).GetSeconds(), + NS_TEST_ASSERT_MSG_EQ_TOL(Seconds(10).GetSeconds(), 10.0, TimeStep(1).GetSeconds(), "is 10 really 10 ?"); diff --git a/src/core/test/timer-test-suite.cc b/src/core/test/timer-test-suite.cc index ca43d5c6f..02c9785ab 100644 --- a/src/core/test/timer-test-suite.cc +++ b/src/core/test/timer-test-suite.cc @@ -67,7 +67,7 @@ TimerStateTestCase::DoRun() timer.SetFunction(&bari); timer.SetArguments(1); - timer.SetDelay(Seconds(10.0)); + timer.SetDelay(Seconds(10)); NS_TEST_ASSERT_MSG_EQ(!timer.IsRunning(), true, ""); NS_TEST_ASSERT_MSG_EQ(timer.IsExpired(), true, ""); NS_TEST_ASSERT_MSG_EQ(!timer.IsSuspended(), true, ""); @@ -160,7 +160,7 @@ TimerTemplateTestCase::DoRun() // the following call cannot possibly work and is flagged by // a runtime error. // timer.SetArguments (0.0); - timer.SetDelay(Seconds(1.0)); + timer.SetDelay(Seconds(1)); timer.Schedule(); timer.SetFunction(&TimerTemplateTestCase::bazi, this); diff --git a/src/csma-layout/examples/csma-star.cc b/src/csma-layout/examples/csma-star.cc index 670d41efa..df0fba7f8 100644 --- a/src/csma-layout/examples/csma-star.cc +++ b/src/csma-layout/examples/csma-star.cc @@ -148,16 +148,16 @@ main(int argc, char* argv[]) Address hubLocalAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", hubLocalAddress); ApplicationContainer hubApp = packetSinkHelper.Install(star.GetHub()); - hubApp.Start(Seconds(1.0)); - hubApp.Stop(Seconds(10.0)); + hubApp.Start(Seconds(1)); + hubApp.Stop(Seconds(10)); } else { Address hubLocalAddress6(Inet6SocketAddress(Ipv6Address::GetAny(), port)); PacketSinkHelper packetSinkHelper6("ns3::TcpSocketFactory", hubLocalAddress6); ApplicationContainer hubApp6 = packetSinkHelper6.Install(star.GetHub()); - hubApp6.Start(Seconds(1.0)); - hubApp6.Stop(Seconds(10.0)); + hubApp6.Start(Seconds(1)); + hubApp6.Stop(Seconds(10)); } // @@ -184,8 +184,8 @@ main(int argc, char* argv[]) spokeApps.Add(onOffHelper.Install(star.GetSpokeNode(i))); } - spokeApps.Start(Seconds(1.0)); - spokeApps.Stop(Seconds(10.0)); + spokeApps.Start(Seconds(1)); + spokeApps.Stop(Seconds(10)); // // Because we are evil, we also add OnOff applications to send TCP to the hub @@ -214,8 +214,8 @@ main(int argc, char* argv[]) fillApps.Add(onOffHelper.Install(fillNodes.Get(i))); } - fillApps.Start(Seconds(1.0)); - fillApps.Stop(Seconds(10.0)); + fillApps.Start(Seconds(1)); + fillApps.Stop(Seconds(10)); NS_LOG_INFO("Enable static global routing."); // diff --git a/src/csma/examples/csma-broadcast.cc b/src/csma/examples/csma-broadcast.cc index 87418c7cc..875296416 100644 --- a/src/csma/examples/csma-broadcast.cc +++ b/src/csma/examples/csma-broadcast.cc @@ -83,16 +83,16 @@ main(int argc, char* argv[]) ApplicationContainer app = onoff.Install(c0.Get(0)); // Start the application - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); app = sink.Install(c0.Get(1)); app.Add(sink.Install(c1.Get(1))); - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Configure ascii tracing of all enqueue, dequeue, and NetDevice receive // events on all devices. Trace output will be sent to the file diff --git a/src/csma/examples/csma-multicast.cc b/src/csma/examples/csma-multicast.cc index f6a52551e..98227949b 100644 --- a/src/csma/examples/csma-multicast.cc +++ b/src/csma/examples/csma-multicast.cc @@ -142,8 +142,8 @@ main(int argc, char* argv[]) ApplicationContainer sinkC = sink.Install(c1.Get(2)); // Node n4 // Start the sink - sinkC.Start(Seconds(1.0)); - sinkC.Stop(Seconds(10.0)); + sinkC.Start(Seconds(1)); + sinkC.Stop(Seconds(10)); NS_LOG_INFO("Configure Tracing."); // diff --git a/src/csma/examples/csma-one-subnet.cc b/src/csma/examples/csma-one-subnet.cc index 76dfdc03a..910bf6acb 100644 --- a/src/csma/examples/csma-one-subnet.cc +++ b/src/csma/examples/csma-one-subnet.cc @@ -81,14 +81,14 @@ main(int argc, char* argv[]) ApplicationContainer app = onoff.Install(nodes.Get(0)); // Start the application - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); app = sink.Install(nodes.Get(1)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); // // Create a similar flow from n3 to n0, starting at time 1.1 seconds @@ -96,10 +96,10 @@ main(int argc, char* argv[]) onoff.SetAttribute("Remote", AddressValue(InetSocketAddress(interfaces.GetAddress(0), port))); app = onoff.Install(nodes.Get(3)); app.Start(Seconds(1.1)); - app.Stop(Seconds(10.0)); + app.Stop(Seconds(10)); app = sink.Install(nodes.Get(0)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); NS_LOG_INFO("Configure Tracing."); // diff --git a/src/csma/examples/csma-packet-socket.cc b/src/csma/examples/csma-packet-socket.cc index 23a91846b..42753fcbd 100644 --- a/src/csma/examples/csma-packet-socket.cc +++ b/src/csma/examples/csma-packet-socket.cc @@ -88,22 +88,22 @@ main(int argc, char* argv[]) OnOffHelper onoff("ns3::PacketSocketFactory", Address(socket)); onoff.SetConstantRate(DataRate("500kb/s")); ApplicationContainer apps = onoff.Install(nodes.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); socket.SetSingleDevice(devs.Get(3)->GetIfIndex()); socket.SetPhysicalAddress(devs.Get(0)->GetAddress()); socket.SetProtocol(3); onoff.SetAttribute("Remote", AddressValue(socket)); apps = onoff.Install(nodes.Get(3)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Install packet sink on node 0 to receive packets from node 1 PacketSinkHelper sink = PacketSinkHelper("ns3::PacketSocketFactory", socket); apps = sink.Install(nodes.Get(0)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(20)); // While the below trace sink is hooked to all nodes (the wildcard "*") // only one packet sink (on node 0) is actually added above, so diff --git a/src/csma/examples/csma-ping.cc b/src/csma/examples/csma-ping.cc index 22509acc3..3742ee8b9 100644 --- a/src/csma/examples/csma-ping.cc +++ b/src/csma/examples/csma-ping.cc @@ -95,14 +95,14 @@ main(int argc, char* argv[]) onoff.SetAttribute("PacketSize", UintegerValue(1200)); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); NS_LOG_INFO("Create Sink."); PacketSinkHelper sink = PacketSinkHelper("ns3::Ipv4RawSocketFactory", dst); apps = sink.Install(c.Get(3)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(11.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(11)); NS_LOG_INFO("Create pinger"); PingHelper ping(addresses.GetAddress(2)); @@ -111,8 +111,8 @@ main(int argc, char* argv[]) pingers.Add(c.Get(1)); pingers.Add(c.Get(3)); apps = ping.Install(pingers); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(5.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(5)); NS_LOG_INFO("Configure Tracing."); // first, pcap tracing in non-promiscuous mode diff --git a/src/csma/examples/csma-raw-ip-socket.cc b/src/csma/examples/csma-raw-ip-socket.cc index f9b4bf2d5..5a7b85aff 100644 --- a/src/csma/examples/csma-raw-ip-socket.cc +++ b/src/csma/examples/csma-raw-ip-socket.cc @@ -94,8 +94,8 @@ main(int argc, char* argv[]) NS_LOG_INFO("Create Sink."); PacketSinkHelper sink = PacketSinkHelper("ns3::Ipv4RawSocketFactory", dst); apps = sink.Install(c.Get(3)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(12.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(12)); NS_LOG_INFO("Configure Tracing."); // first, pcap tracing in non-promiscuous mode diff --git a/src/dsdv/examples/dsdv-manet.cc b/src/dsdv/examples/dsdv-manet.cc index ac2716df2..6a979572f 100644 --- a/src/dsdv/examples/dsdv-manet.cc +++ b/src/dsdv/examples/dsdv-manet.cc @@ -229,7 +229,7 @@ DsdvManetExample::CheckThroughput() out.close(); packetsReceived = 0; - Simulator::Schedule(Seconds(1.0), &DsdvManetExample::CheckThroughput, this); + Simulator::Schedule(Seconds(1), &DsdvManetExample::CheckThroughput, this); } Ptr diff --git a/src/dsr/examples/dsr-example.cc b/src/dsr/examples/dsr-example.cc index 6c0f1811d..425c84d36 100644 --- a/src/dsr/examples/dsr-example.cc +++ b/src/dsr/examples/dsr-example.cc @@ -183,7 +183,7 @@ main(int argc, char* argv[]) PacketSinkHelper sink("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer apps_sink = sink.Install(adhocNodes.Get(i)); - apps_sink.Start(Seconds(0.0)); + apps_sink.Start(Seconds(0)); apps_sink.Stop(Seconds(TotalTime)); OnOffHelper onoff1("ns3::UdpSocketFactory", diff --git a/src/dsr/model/dsr-routing.cc b/src/dsr/model/dsr-routing.cc index b8b21315f..f384d2f6f 100644 --- a/src/dsr/model/dsr-routing.cc +++ b/src/dsr/model/dsr-routing.cc @@ -326,7 +326,7 @@ DsrRouting::GetTypeId() MakeUintegerChecker()) .AddAttribute("MaxNetworkQueueDelay", "The max time for a packet to stay in the network queue.", - TimeValue(Seconds(30.0)), + TimeValue(Seconds(30)), MakeTimeAccessor(&DsrRouting::m_maxNetworkDelay), MakeTimeChecker()) .AddAttribute("NumPriorityQueues", diff --git a/src/energy/examples/rv-battery-model-test.cc b/src/energy/examples/rv-battery-model-test.cc index e05f774b8..1d50d090e 100644 --- a/src/energy/examples/rv-battery-model-test.cc +++ b/src/energy/examples/rv-battery-model-test.cc @@ -528,7 +528,7 @@ BatteryLifetimeTest::CreateLoadProfiles() } loads.push_back(0.2227); - timeStamps.push_back(Seconds(200.0)); + timeStamps.push_back(Seconds(200)); profile.loads = loads; profile.timeStamps = timeStamps; @@ -555,7 +555,7 @@ BatteryLifetimeTest::CreateLoadProfiles() } loads.push_back(0.2227); - timeStamps.push_back(Seconds(200.0)); + timeStamps.push_back(Seconds(200)); profile.loads = loads; profile.timeStamps = timeStamps; @@ -638,27 +638,27 @@ main(int argc, char** argv) BatteryLifetimeTest test; int ret = 0; - if (test.ConstantLoadTest(0.640, Seconds(2844.0))) + if (test.ConstantLoadTest(0.640, Seconds(2844))) { ret = 1; std::cerr << "Problems with constant load test (640mA)." << std::endl; } - if (test.ConstantLoadTest(0.320, Seconds(6146.0))) + if (test.ConstantLoadTest(0.320, Seconds(6146))) { ret = 1; std::cerr << "Problems with constant load test (320mA)." << std::endl; } - if (test.ConstantLoadTest(0.128, Seconds(16052.0))) + if (test.ConstantLoadTest(0.128, Seconds(16052))) { ret = 1; std::cerr << "Problems with constant load test (128mA)." << std::endl; } - if (test.ConstantLoadTest(0.064, Seconds(32561.0))) + if (test.ConstantLoadTest(0.064, Seconds(32561))) { ret = 1; std::cerr << "Problems with constant load test (64mA)." << std::endl; } - if (test.ConstantLoadTest(0.032, Seconds(65580.0))) + if (test.ConstantLoadTest(0.032, Seconds(65580))) { ret = 1; std::cerr << "Problems with constant load test (32mA)." << std::endl; @@ -766,7 +766,7 @@ BatteryLifetimeTest::ConstantLoadTest(double load, Time expLifetime) const DeviceEnergyModelContainer deviceModels = radioEnergyHelper.Install(devices, sources); // run simulation - Simulator::Stop(Seconds(70000.0)); + Simulator::Stop(Seconds(70000)); Simulator::Run(); Time actualLifetime; @@ -864,7 +864,7 @@ BatteryLifetimeTest::VariableLoadTest(std::vector loads, } // run simulation - Simulator::Stop(Seconds(70000.0)); + Simulator::Stop(Seconds(70000)); Simulator::Run(); Time actualLifetime; diff --git a/src/energy/model/basic-energy-harvester.cc b/src/energy/model/basic-energy-harvester.cc index f2e86c537..61ced5d81 100644 --- a/src/energy/model/basic-energy-harvester.cc +++ b/src/energy/model/basic-energy-harvester.cc @@ -36,7 +36,7 @@ BasicEnergyHarvester::GetTypeId() .AddAttribute("PeriodicHarvestedPowerUpdateInterval", "Time between two consecutive periodic updates of the harvested power. " "By default, the value is updated every 1 s", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&BasicEnergyHarvester::SetHarvestedPowerUpdateInterval, &BasicEnergyHarvester::GetHarvestedPowerUpdateInterval), MakeTimeChecker()) diff --git a/src/energy/model/basic-energy-source.cc b/src/energy/model/basic-energy-source.cc index 9b5ba7c11..f65000b0e 100644 --- a/src/energy/model/basic-energy-source.cc +++ b/src/energy/model/basic-energy-source.cc @@ -55,7 +55,7 @@ BasicEnergySource::GetTypeId() MakeDoubleChecker()) .AddAttribute("PeriodicEnergyUpdateInterval", "Time between two consecutive periodic energy updates.", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&BasicEnergySource::SetEnergyUpdateInterval, &BasicEnergySource::GetEnergyUpdateInterval), MakeTimeChecker()) @@ -69,7 +69,7 @@ BasicEnergySource::GetTypeId() BasicEnergySource::BasicEnergySource() { NS_LOG_FUNCTION(this); - m_lastUpdateTime = Seconds(0.0); + m_lastUpdateTime = Seconds(0); m_depleted = false; } diff --git a/src/energy/model/generic-battery-model.cc b/src/energy/model/generic-battery-model.cc index 5d7014df9..9aedf1376 100644 --- a/src/energy/model/generic-battery-model.cc +++ b/src/energy/model/generic-battery-model.cc @@ -88,7 +88,7 @@ GenericBatteryModel::GetTypeId() MakeDoubleChecker()) .AddAttribute("PeriodicEnergyUpdateInterval", "Time between two consecutive periodic energy updates.", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&GenericBatteryModel::SetEnergyUpdateInterval, &GenericBatteryModel::GetEnergyUpdateInterval), MakeTimeChecker()) diff --git a/src/energy/model/li-ion-energy-source.cc b/src/energy/model/li-ion-energy-source.cc index 8cc7f952f..e68833671 100644 --- a/src/energy/model/li-ion-energy-source.cc +++ b/src/energy/model/li-ion-energy-source.cc @@ -92,7 +92,7 @@ LiIonEnergySource::GetTypeId() MakeDoubleChecker()) .AddAttribute("PeriodicEnergyUpdateInterval", "Time between two consecutive periodic energy updates.", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&LiIonEnergySource::SetEnergyUpdateInterval, &LiIonEnergySource::GetEnergyUpdateInterval), MakeTimeChecker()) diff --git a/src/energy/model/rv-battery-model.cc b/src/energy/model/rv-battery-model.cc index 444f4ca87..89c8d4090 100644 --- a/src/energy/model/rv-battery-model.cc +++ b/src/energy/model/rv-battery-model.cc @@ -35,7 +35,7 @@ RvBatteryModel::GetTypeId() .AddConstructor() .AddAttribute("RvBatteryModelPeriodicEnergyUpdateInterval", "RV battery model sampling interval.", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&RvBatteryModel::SetSamplingInterval, &RvBatteryModel::GetSamplingInterval), MakeTimeChecker()) @@ -90,7 +90,7 @@ RvBatteryModel::RvBatteryModel() m_timeStamps.push_back(m_lastSampleTime); m_previousLoad = -1.0; m_batteryLevel = 1; // fully charged - m_lifetime = Seconds(0.0); + m_lifetime = Seconds(0); } RvBatteryModel::~RvBatteryModel() @@ -336,7 +336,7 @@ RvBatteryModel::Discharge(double load, Time t) if (m_timeStamps.size() == 1) { // constant load - calculatedAlpha = m_load[0] * RvModelAFunction(t, t, Seconds(0.0), m_beta); + calculatedAlpha = m_load[0] * RvModelAFunction(t, t, Seconds(0), m_beta); } else { diff --git a/src/energy/model/simple-device-energy-model.cc b/src/energy/model/simple-device-energy-model.cc index 0a89dd5d0..32744997a 100644 --- a/src/energy/model/simple-device-energy-model.cc +++ b/src/energy/model/simple-device-energy-model.cc @@ -41,7 +41,7 @@ SimpleDeviceEnergyModel::GetTypeId() SimpleDeviceEnergyModel::SimpleDeviceEnergyModel() { NS_LOG_FUNCTION(this); - m_lastUpdateTime = Seconds(0.0); + m_lastUpdateTime = Seconds(0); m_actualCurrentA = 0.0; m_source = nullptr; } diff --git a/src/fd-net-device/examples/dummy-network.cc b/src/fd-net-device/examples/dummy-network.cc index b0a5132f6..034d1b77b 100644 --- a/src/fd-net-device/examples/dummy-network.cc +++ b/src/fd-net-device/examples/dummy-network.cc @@ -57,8 +57,8 @@ main(int argc, char* argv[]) app->SetAttribute("Destination", AddressValue(interfaces.GetAddress(0))); app->SetAttribute("VerboseMode", EnumValue(Ping::VerboseMode::VERBOSE)); nodes.Get(1)->AddApplication(app); - app->SetStartTime(Seconds(0.0)); - app->SetStopTime(Seconds(4.0)); + app->SetStartTime(Seconds(0)); + app->SetStopTime(Seconds(4)); fd.EnablePcapAll("dummy-network", true); diff --git a/src/fd-net-device/examples/fd-emu-onoff.cc b/src/fd-net-device/examples/fd-emu-onoff.cc index adc192918..cd7cf668a 100644 --- a/src/fd-net-device/examples/fd-emu-onoff.cc +++ b/src/fd-net-device/examples/fd-emu-onoff.cc @@ -245,8 +245,8 @@ main(int argc, char* argv[]) Address sinkLocalAddress(InetSocketAddress(localIp, sinkPort)); PacketSinkHelper sinkHelper(socketType, sinkLocalAddress); ApplicationContainer sinkApp = sinkHelper.Install(node); - sinkApp.Start(Seconds(1.0)); - sinkApp.Stop(Seconds(60.0)); + sinkApp.Start(Seconds(1)); + sinkApp.Stop(Seconds(60)); helper->EnablePcap("fd-server", device); } @@ -261,13 +261,13 @@ main(int argc, char* argv[]) onoff.SetAttribute("PacketSize", UintegerValue(packetSize)); ApplicationContainer clientApps = onoff.Install(node); - clientApps.Start(Seconds(4.0)); - clientApps.Stop(Seconds(58.0)); + clientApps.Start(Seconds(4)); + clientApps.Stop(Seconds(58)); helper->EnablePcap("fd-client", device); } - Simulator::Stop(Seconds(61.0)); + Simulator::Stop(Seconds(61)); Simulator::Run(); Simulator::Destroy(); delete helper; diff --git a/src/fd-net-device/examples/fd-emu-ping.cc b/src/fd-net-device/examples/fd-emu-ping.cc index f17388a79..74abb83db 100644 --- a/src/fd-net-device/examples/fd-emu-ping.cc +++ b/src/fd-net-device/examples/fd-emu-ping.cc @@ -263,8 +263,8 @@ main(int argc, char* argv[]) app->SetAttribute("Destination", AddressValue(remoteIp)); app->SetAttribute("VerboseMode", EnumValue(Ping::VerboseMode::VERBOSE)); node->AddApplication(app); - app->SetStartTime(Seconds(1.0)); - app->SetStopTime(Seconds(22.0)); + app->SetStartTime(Seconds(1)); + app->SetStopTime(Seconds(22)); // // Give the application a name. This makes life much easier when constructing @@ -286,7 +286,7 @@ main(int argc, char* argv[]) // Now, do the actual emulation. // NS_LOG_INFO("Run Emulation in " << emuMode << " mode."); - Simulator::Stop(Seconds(23.0)); + Simulator::Stop(Seconds(23)); Simulator::Run(); Simulator::Destroy(); delete helper; diff --git a/src/fd-net-device/examples/fd-emu-send.cc b/src/fd-net-device/examples/fd-emu-send.cc index 99a062511..d1b36e51b 100644 --- a/src/fd-net-device/examples/fd-emu-send.cc +++ b/src/fd-net-device/examples/fd-emu-send.cc @@ -181,7 +181,7 @@ main(int argc, char* argv[]) Simulator::Schedule(Seconds(3), &Send, device, level, emuMode); NS_LOG_INFO("Run Emulation."); - Simulator::Stop(Seconds(6.0)); + Simulator::Stop(Seconds(6)); Simulator::Run(); Simulator::Destroy(); delete helper; diff --git a/src/fd-net-device/examples/fd-emu-tc.cc b/src/fd-net-device/examples/fd-emu-tc.cc index 1e9cfcd96..a9f31e797 100644 --- a/src/fd-net-device/examples/fd-emu-tc.cc +++ b/src/fd-net-device/examples/fd-emu-tc.cc @@ -299,7 +299,7 @@ main(int argc, char* argv[]) } NS_LOG_INFO("Run Emulation."); - Simulator::Stop(Seconds(50.0)); + Simulator::Stop(Seconds(50)); Simulator::Run(); Simulator::Destroy(); delete helper0; diff --git a/src/fd-net-device/examples/fd-emu-udp-echo.cc b/src/fd-net-device/examples/fd-emu-udp-echo.cc index 6c2fc411e..6cff2759b 100644 --- a/src/fd-net-device/examples/fd-emu-udp-echo.cc +++ b/src/fd-net-device/examples/fd-emu-udp-echo.cc @@ -169,7 +169,7 @@ main(int argc, char* argv[]) NS_LOG_INFO("Create Applications."); UdpEchoServerHelper server(9); apps = server.Install(n.Get(0)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); apps.Stop(Seconds(stopTime)); } else if (clientMode) @@ -185,7 +185,7 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(packetSize)); apps = client.Install(n.Get(0)); - apps.Start(Seconds(2.0)); + apps.Start(Seconds(2)); apps.Stop(Seconds(stopTime)); } else @@ -196,7 +196,7 @@ main(int argc, char* argv[]) NS_LOG_INFO("Create Applications."); UdpEchoServerHelper server(9); apps = server.Install(n.Get(1)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); apps.Stop(Seconds(stopTime)); // @@ -210,7 +210,7 @@ main(int argc, char* argv[]) client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(packetSize)); apps = client.Install(n.Get(0)); - apps.Start(Seconds(2.0)); + apps.Start(Seconds(2)); apps.Stop(Seconds(stopTime)); } diff --git a/src/fd-net-device/examples/fd-tap-ping.cc b/src/fd-net-device/examples/fd-tap-ping.cc index dd472b44a..d1dceb339 100644 --- a/src/fd-net-device/examples/fd-tap-ping.cc +++ b/src/fd-net-device/examples/fd-tap-ping.cc @@ -195,8 +195,8 @@ main(int argc, char* argv[]) app->SetAttribute("Destination", AddressValue(remoteIp)); app->SetAttribute("VerboseMode", EnumValue(Ping::VerboseMode::VERBOSE)); node->AddApplication(app); - app->SetStartTime(Seconds(1.0)); - app->SetStopTime(Seconds(21.0)); + app->SetStartTime(Seconds(1)); + app->SetStopTime(Seconds(21)); // // Give the application a name. This makes life much easier when constructing @@ -218,7 +218,7 @@ main(int argc, char* argv[]) // Now, do the actual emulation. // NS_LOG_INFO("Run Emulation."); - Simulator::Stop(Seconds(25.0)); + Simulator::Stop(Seconds(25)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/src/fd-net-device/examples/fd-tap-ping6.cc b/src/fd-net-device/examples/fd-tap-ping6.cc index 6dadcbf49..09c9d7154 100644 --- a/src/fd-net-device/examples/fd-tap-ping6.cc +++ b/src/fd-net-device/examples/fd-tap-ping6.cc @@ -124,7 +124,7 @@ main(int argc, char* argv[]) // uint32_t packetSize = 1024; uint32_t maxPacketCount = 1; - Time interPacketInterval = Seconds(1.0); + Time interPacketInterval = Seconds(1); PingHelper ping(Ipv6Address(tapIp.c_str())); ping.SetAttribute("Count", UintegerValue(maxPacketCount)); @@ -140,8 +140,8 @@ main(int argc, char* argv[]) // ping6.SetAttribute("Interval", TimeValue(interPacketInterval)); // ping6.SetAttribute("PacketSize", UintegerValue(packetSize)); // ApplicationContainer apps = ping6.Install(n); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(20)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("csma-ping6.tr")); @@ -156,7 +156,7 @@ main(int argc, char* argv[]) // Run the experiment. // NS_LOG_INFO("Run Emulation."); - Simulator::Stop(Seconds(200.0)); + Simulator::Stop(Seconds(200)); Simulator::Run(); Simulator::Destroy(); NS_LOG_INFO("Done."); diff --git a/src/fd-net-device/examples/fd2fd-onoff.cc b/src/fd-net-device/examples/fd2fd-onoff.cc index e603a9d4e..62232a6e6 100644 --- a/src/fd-net-device/examples/fd2fd-onoff.cc +++ b/src/fd-net-device/examples/fd2fd-onoff.cc @@ -109,8 +109,8 @@ main(int argc, char* argv[]) PacketSinkHelper sinkHelper(factory, sinkLocalAddress); ApplicationContainer sinkApp = sinkHelper.Install(serverNode); - sinkApp.Start(Seconds(0.0)); - sinkApp.Stop(Seconds(30.0)); + sinkApp.Start(Seconds(0)); + sinkApp.Stop(Seconds(30)); fd.EnablePcap("fd2fd-onoff-server", serverDevice); // client @@ -122,11 +122,11 @@ main(int argc, char* argv[]) onoff.SetAttribute("DataRate", DataRateValue(dataRate)); onoff.SetAttribute("PacketSize", UintegerValue(packetSize)); ApplicationContainer clientApps = onoff.Install(clientNode); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(29.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(29)); fd.EnablePcap("fd2fd-onoff-client", clientDevice); - Simulator::Stop(Seconds(30.0)); + Simulator::Stop(Seconds(30)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/fd-net-device/examples/realtime-dummy-network.cc b/src/fd-net-device/examples/realtime-dummy-network.cc index 8a8d183ac..7afc15f5a 100644 --- a/src/fd-net-device/examples/realtime-dummy-network.cc +++ b/src/fd-net-device/examples/realtime-dummy-network.cc @@ -60,8 +60,8 @@ main(int argc, char* argv[]) app->SetAttribute("Destination", AddressValue(interfaces.GetAddress(0))); app->SetAttribute("VerboseMode", EnumValue(Ping::VerboseMode::VERBOSE)); nodes.Get(1)->AddApplication(app); - app->SetStartTime(Seconds(0.0)); - app->SetStopTime(Seconds(4.0)); + app->SetStartTime(Seconds(0)); + app->SetStopTime(Seconds(4)); fd.EnablePcapAll("realtime-dummy-network", false); diff --git a/src/fd-net-device/examples/realtime-fd2fd-onoff.cc b/src/fd-net-device/examples/realtime-fd2fd-onoff.cc index ba0de22cc..441b3cd5d 100644 --- a/src/fd-net-device/examples/realtime-fd2fd-onoff.cc +++ b/src/fd-net-device/examples/realtime-fd2fd-onoff.cc @@ -94,8 +94,8 @@ main(int argc, char* argv[]) Address sinkLocalAddress(InetSocketAddress(serverIp, sinkPort)); PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", sinkLocalAddress); ApplicationContainer sinkApp = sinkHelper.Install(serverNode); - sinkApp.Start(Seconds(0.0)); - sinkApp.Stop(Seconds(40.0)); + sinkApp.Start(Seconds(0)); + sinkApp.Stop(Seconds(40)); fd.EnablePcap("rt-fd2fd-onoff-server", serverDevice); // client @@ -107,11 +107,11 @@ main(int argc, char* argv[]) onoff.SetAttribute("DataRate", DataRateValue(dataRate)); onoff.SetAttribute("PacketSize", UintegerValue(packetSize)); ApplicationContainer clientApps = onoff.Install(clientNode); - clientApps.Start(Seconds(1.0)); - clientApps.Stop(Seconds(39.0)); + clientApps.Start(Seconds(1)); + clientApps.Stop(Seconds(39)); fd.EnablePcap("rt-fd2fd-onoff-client", clientDevice); - Simulator::Stop(Seconds(40.0)); + Simulator::Stop(Seconds(40)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/flow-monitor/examples/wifi-olsr-flowmon.py b/src/flow-monitor/examples/wifi-olsr-flowmon.py index 8fd51bbd2..f2d5ecf74 100644 --- a/src/flow-monitor/examples/wifi-olsr-flowmon.py +++ b/src/flow-monitor/examples/wifi-olsr-flowmon.py @@ -114,7 +114,7 @@ def main(argv): monitor.SetAttribute("JitterBinWidth", ns.DoubleValue(0.001)) monitor.SetAttribute("PacketSizeBinWidth", ns.DoubleValue(20)) - ns.Simulator.Stop(ns.Seconds(44.0)) + ns.Simulator.Stop(ns.Seconds(44)) ns.Simulator.Run() def print_stats(os, st): diff --git a/src/flow-monitor/model/flow-monitor.cc b/src/flow-monitor/model/flow-monitor.cc index eb746a1c3..bd1c8ea06 100644 --- a/src/flow-monitor/model/flow-monitor.cc +++ b/src/flow-monitor/model/flow-monitor.cc @@ -37,12 +37,12 @@ FlowMonitor::GetTypeId() "MaxPerHopDelay", ("The maximum per-hop delay that should be considered. " "Packets still not received after this delay are to be considered lost."), - TimeValue(Seconds(10.0)), + TimeValue(Seconds(10)), MakeTimeAccessor(&FlowMonitor::m_maxPerHopDelay), MakeTimeChecker()) .AddAttribute("StartTime", ("The time when the monitoring starts."), - TimeValue(Seconds(0.0)), + TimeValue(Seconds(0)), MakeTimeAccessor(&FlowMonitor::Start), MakeTimeChecker()) .AddAttribute("DelayBinWidth", diff --git a/src/internet-apps/examples/dhcp-example.cc b/src/internet-apps/examples/dhcp-example.cc index 441ec9599..9149a4438 100644 --- a/src/internet-apps/examples/dhcp-example.cc +++ b/src/internet-apps/examples/dhcp-example.cc @@ -145,7 +145,7 @@ main(int argc, char* argv[]) DynamicCast(dhcpServerApp.Get(0)) ->AddStaticDhcpEntry(devNet.Get(2)->GetAddress(), Ipv4Address("172.30.0.14")); - dhcpServerApp.Start(Seconds(0.0)); + dhcpServerApp.Start(Seconds(0)); dhcpServerApp.Stop(stopTime); // DHCP clients @@ -155,25 +155,25 @@ main(int argc, char* argv[]) dhcpClientNetDevs.Add(devNet.Get(2)); ApplicationContainer dhcpClients = dhcpHelper.InstallDhcpClient(dhcpClientNetDevs); - dhcpClients.Start(Seconds(1.0)); + dhcpClients.Start(Seconds(1)); dhcpClients.Stop(stopTime); UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(p2pNodes.Get(1)); - serverApps.Start(Seconds(0.0)); + serverApps.Start(Seconds(0)); serverApps.Stop(stopTime); UdpEchoClientHelper echoClient(p2pInterfaces.GetAddress(1), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(100)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(nodes.Get(1)); - clientApps.Start(Seconds(10.0)); + clientApps.Start(Seconds(10)); clientApps.Stop(stopTime); - Simulator::Stop(stopTime + Seconds(10.0)); + Simulator::Stop(stopTime + Seconds(10)); if (tracing) { diff --git a/src/internet-apps/examples/ping-example.cc b/src/internet-apps/examples/ping-example.cc index 9b3dff205..f46608c61 100644 --- a/src/internet-apps/examples/ping-example.cc +++ b/src/internet-apps/examples/ping-example.cc @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) { bool logging{false}; - Time interPacketInterval{Seconds(1.0)}; + Time interPacketInterval{Seconds(1)}; uint32_t size{56}; uint32_t count{5}; std::string destinationStr; @@ -246,7 +246,7 @@ main(int argc, char* argv[]) pointToPoint.EnablePcapAll("ping-example"); - Simulator::Stop(Seconds(60.0)); + Simulator::Stop(Seconds(60)); Simulator::Run(); Simulator::Destroy(); return 0; diff --git a/src/internet-apps/test/dhcp-test.cc b/src/internet-apps/test/dhcp-test.cc index 115dcccd2..21b5e4e1d 100644 --- a/src/internet-apps/test/dhcp-test.cc +++ b/src/internet-apps/test/dhcp-test.cc @@ -97,8 +97,8 @@ DhcpTestCase::DoRun() Ipv4Address("172.30.0.10"), Ipv4Address("172.30.0.15"), Ipv4Address("172.30.0.17")); - dhcpServerApp.Start(Seconds(0.0)); - dhcpServerApp.Stop(Seconds(20.0)); + dhcpServerApp.Start(Seconds(0)); + dhcpServerApp.Stop(Seconds(20)); DynamicCast(dhcpServerApp.Get(0)) ->AddStaticDhcpEntry(devNet.Get(3)->GetAddress(), Ipv4Address("172.30.0.14")); @@ -109,8 +109,8 @@ DhcpTestCase::DoRun() dhcpClientNetDevs.Add(devNet.Get(3)); ApplicationContainer dhcpClientApps = dhcpHelper.InstallDhcpClient(dhcpClientNetDevs); - dhcpClientApps.Start(Seconds(1.0)); - dhcpClientApps.Stop(Seconds(20.0)); + dhcpClientApps.Start(Seconds(1)); + dhcpClientApps.Stop(Seconds(20)); dhcpClientApps.Get(0)->TraceConnect("NewLease", "0", @@ -122,7 +122,7 @@ DhcpTestCase::DoRun() "2", MakeCallback(&DhcpTestCase::LeaseObtained, this)); - Simulator::Stop(Seconds(21.0)); + Simulator::Stop(Seconds(21)); Simulator::Run(); diff --git a/src/internet-apps/test/ipv6-radvd-test.cc b/src/internet-apps/test/ipv6-radvd-test.cc index 2d39c6e1d..dc070b3ce 100644 --- a/src/internet-apps/test/ipv6-radvd-test.cc +++ b/src/internet-apps/test/ipv6-radvd-test.cc @@ -207,8 +207,8 @@ RadvdTestCase::DoRun() radvdHelper.GetRadvdInterface(iic2.GetInterfaceIndex(1))->SetSendAdvert(false); ApplicationContainer radvdApps = radvdHelper.Install(r); - radvdApps.Start(Seconds(1.0)); - radvdApps.Stop(Seconds(10.0)); + radvdApps.Start(Seconds(1)); + radvdApps.Stop(Seconds(10)); Simulator::Schedule(Seconds(2), &RadvdTestCase::CheckAddresses, @@ -225,7 +225,7 @@ RadvdTestCase::DoRun() d2.Get(0), d2.Get(1)); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); diff --git a/src/internet-apps/test/ping-test.cc b/src/internet-apps/test/ping-test.cc index 17e1c0ffe..3d88b3ce4 100644 --- a/src/internet-apps/test/ping-test.cc +++ b/src/internet-apps/test/ping-test.cc @@ -242,13 +242,13 @@ class PingTestCase : public TestCase bool m_checkReportLoss{false}; //!< Set to true to check the Loss number bool m_checkReportTime{false}; //!< Set to true to check the Time - Time m_startTime{Seconds(1)}; //!< Start time - Time m_stopTime{Seconds(5)}; //!< Stop time - Time m_simulatorStopTime{Seconds(6)}; //!< Simulator stop time - bool m_useIpv6{false}; //!< Use IPv6 (true) or IPv4 (false) - Time m_interpacketInterval{Seconds(1.0)}; //!< Time between pings - Time m_lastTx; //!< Last ping Tx time - std::list m_dropList; //!< Drop first reply (true) + Time m_startTime{Seconds(1)}; //!< Start time + Time m_stopTime{Seconds(5)}; //!< Stop time + Time m_simulatorStopTime{Seconds(6)}; //!< Simulator stop time + bool m_useIpv6{false}; //!< Use IPv6 (true) or IPv4 (false) + Time m_interpacketInterval{Seconds(1)}; //!< Time between pings + Time m_lastTx; //!< Last ping Tx time + std::list m_dropList; //!< Drop first reply (true) NodeContainer m_nodes; //!< The simulation nodes Ipv4InterfaceContainer m_ipv4Interfaces; //!< The IPv4 interfaces @@ -671,7 +671,7 @@ PingTestSuite::PingTestSuite() // The number sent (2) is equal to number received (2) // How validated: PingReport trace is checked for number of packets // transmitted (2) and received (2), and number of drops (0) - Time interval = Seconds(3.0); + Time interval = Seconds(3); auto testcase4v4 = new PingTestCase("4. Test for the operation of interval attribute for IPv4", USEIPV6_FALSE); testcase4v4->SetStartTime(Seconds(1)); diff --git a/src/internet/doc/tcp.rst b/src/internet/doc/tcp.rst index db9af5217..809b46641 100644 --- a/src/internet/doc/tcp.rst +++ b/src/internet/doc/tcp.rst @@ -124,8 +124,8 @@ Using the helper functions defined in ``src/applications/helper`` and Address sinkLocalAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", sinkLocalAddress); ApplicationContainer sinkApp = sinkHelper.Install(serverNode); - sinkApp.Start(Seconds(1.0)); - sinkApp.Stop(Seconds(10.0)); + sinkApp.Start(Seconds(1)); + sinkApp.Stop(Seconds(10)); Similarly, the below snippet configures OnOffApplication traffic source to use TCP:: @@ -1855,7 +1855,7 @@ the method ConfigureEnvironment: TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(20); SetMTU(500); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); SetPropagationDelay(MilliSeconds(50)); } @@ -1901,7 +1901,7 @@ following code): Ptr socket = TcpGeneralTest::CreateReceiverSocket(node); socket->SetAttribute("RcvBufSize", UintegerValue(0)); - Simulator::Schedule(Seconds(10.0), + Simulator::Schedule(Seconds(10), &TcpZeroWindowTest::IncreaseBufSize, this); return socket; diff --git a/src/internet/doc/udp.rst b/src/internet/doc/udp.rst index 5c613959c..7a9ac8fc3 100644 --- a/src/internet/doc/udp.rst +++ b/src/internet/doc/udp.rst @@ -66,8 +66,8 @@ is how one would create a UDP receiver:: Address sinkLocalAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper sinkHelper("ns3::UdpSocketFactory", sinkLocalAddress); ApplicationContainer sinkApp = sinkHelper.Install(serverNode); - sinkApp.Start(Seconds(1.0)); - sinkApp.Stop(Seconds(10.0)); + sinkApp.Start(Seconds(1)); + sinkApp.Stop(Seconds(10)); Similarly, the below snippet configures OnOffApplication traffic source to use UDP:: @@ -76,8 +76,8 @@ UDP:: OnOffHelper clientHelper("ns3::UdpSocketFactory", Address()); clientHelper.SetAttribute("Remote", remoteAddress); ApplicationContainer clientApps =(clientHelper.Install(clientNode); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(9.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(9)); For users who wish to have a pointer to the actual socket(so that socket operations like ``Bind()``, setting socket options, etc. can be diff --git a/src/internet/examples/neighbor-cache-dynamic.cc b/src/internet/examples/neighbor-cache-dynamic.cc index 0b6e308e2..728b648af 100644 --- a/src/internet/examples/neighbor-cache-dynamic.cc +++ b/src/internet/examples/neighbor-cache-dynamic.cc @@ -261,7 +261,7 @@ main(int argc, char* argv[]) Ipv6RoutingHelper::PrintNeighborCacheAllAt(Seconds(2), outputStream); } - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); return 0; diff --git a/src/internet/examples/neighbor-cache-example.cc b/src/internet/examples/neighbor-cache-example.cc index 47875c706..60bfa2052 100644 --- a/src/internet/examples/neighbor-cache-example.cc +++ b/src/internet/examples/neighbor-cache-example.cc @@ -458,7 +458,7 @@ NeighborCacheExample::Run() onoff.SetConstantRate(DataRate("10Gbps")); onoff.SetAttribute("EnableSeqTsSizeHeader", BooleanValue(true)); ApplicationContainer apps = onoff.Install(csmaNodesLeft.Get(0)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", @@ -538,7 +538,7 @@ NeighborCacheExample::Run() onoff.SetConstantRate(DataRate("10Gbps")); onoff.SetAttribute("EnableSeqTsSizeHeader", BooleanValue(true)); ApplicationContainer apps = onoff.Install(csmaNodesLeft.Get(0)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", diff --git a/src/internet/model/icmpv6-l4-protocol.cc b/src/internet/model/icmpv6-l4-protocol.cc index e1e33a057..21b7c41d9 100644 --- a/src/internet/model/icmpv6-l4-protocol.cc +++ b/src/internet/model/icmpv6-l4-protocol.cc @@ -1879,7 +1879,7 @@ Icmpv6L4Protocol::FunctionDadTimeout(Ipv6Interface* interface, Ipv6Address addr) */ NS_LOG_LOGIC("Scheduled a first Router Solicitation"); m_rsRetransmissionCount = 0; - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &Icmpv6L4Protocol::SendRS, this, ifaddr.GetAddress(), diff --git a/src/internet/model/loopback-net-device.cc b/src/internet/model/loopback-net-device.cc index 9e2aa92d1..bb909a9de 100644 --- a/src/internet/model/loopback-net-device.cc +++ b/src/internet/model/loopback-net-device.cc @@ -172,7 +172,7 @@ LoopbackNetDevice::Send(Ptr packet, const Address& dest, uint16_t protoc Mac48Address to = Mac48Address::ConvertFrom(dest); NS_ASSERT_MSG(to == GetBroadcast() || to == m_address, "Invalid destination address"); Simulator::ScheduleWithContext(m_node->GetId(), - Seconds(0.0), + Seconds(0), &LoopbackNetDevice::Receive, this, packet, @@ -193,7 +193,7 @@ LoopbackNetDevice::SendFrom(Ptr packet, Mac48Address from = Mac48Address::ConvertFrom(source); NS_ASSERT_MSG(to.IsBroadcast() || to == m_address, "Invalid destination address"); Simulator::ScheduleWithContext(m_node->GetId(), - Seconds(0.0), + Seconds(0), &LoopbackNetDevice::Receive, this, packet, diff --git a/src/internet/model/rtt-estimator.cc b/src/internet/model/rtt-estimator.cc index 8455a184d..297a82ad6 100644 --- a/src/internet/model/rtt-estimator.cc +++ b/src/internet/model/rtt-estimator.cc @@ -39,7 +39,7 @@ RttEstimator::GetTypeId() .SetGroupName("Internet") .AddAttribute("InitialEstimation", "Initial RTT estimate", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&RttEstimator::m_initialEstimatedRtt), MakeTimeChecker()); return tid; diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index b06b34583..ff573c00e 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -142,7 +142,7 @@ TcpSocketBase::GetTypeId() .AddAttribute( "MinRto", "Minimum retransmit timeout value", - TimeValue(Seconds(1.0)), // RFC 6298 says min RTO=1 sec, but Linux uses 200ms. + TimeValue(Seconds(1)), // RFC 6298 says min RTO=1 sec, but Linux uses 200ms. // See http://www.postel.org/pipermail/end2end-interest/2004-November/004402.html MakeTimeAccessor(&TcpSocketBase::SetMinRto, &TcpSocketBase::GetMinRto), MakeTimeChecker()) diff --git a/src/internet/test/ipv4-global-routing-test-suite.cc b/src/internet/test/ipv4-global-routing-test-suite.cc index 41fc4f87a..66d1dc8c0 100644 --- a/src/internet/test/ipv4-global-routing-test-suite.cc +++ b/src/internet/test/ipv4-global-routing-test-suite.cc @@ -1027,8 +1027,8 @@ Ipv4DynamicGlobalRoutingTestCase::DoRun() sendSockA.first->Connect(InetSocketAddress(i5i6.GetAddress(1), port)); sendSockA.second = true; m_sendSocks.push_back(sendSockA); - Simulator::Schedule(Seconds(1.0), &Ipv4DynamicGlobalRoutingTestCase::SendData, this, 0); - Simulator::Schedule(Seconds(10.0), &Ipv4DynamicGlobalRoutingTestCase::ShutDownSock, this, 0); + Simulator::Schedule(Seconds(1), &Ipv4DynamicGlobalRoutingTestCase::SendData, this, 0); + Simulator::Schedule(Seconds(10), &Ipv4DynamicGlobalRoutingTestCase::ShutDownSock, this, 0); std::pair, bool> sendSockB; sendSockB.first = Socket::CreateSocket(c.Get(1), tid); @@ -1036,8 +1036,8 @@ Ipv4DynamicGlobalRoutingTestCase::DoRun() sendSockB.first->Connect(InetSocketAddress(i1i6.GetAddress(1), port)); sendSockB.second = true; m_sendSocks.push_back(sendSockB); - Simulator::Schedule(Seconds(11.0), &Ipv4DynamicGlobalRoutingTestCase::SendData, this, 1); - Simulator::Schedule(Seconds(16.0), &Ipv4DynamicGlobalRoutingTestCase::ShutDownSock, this, 1); + Simulator::Schedule(Seconds(11), &Ipv4DynamicGlobalRoutingTestCase::SendData, this, 1); + Simulator::Schedule(Seconds(16), &Ipv4DynamicGlobalRoutingTestCase::ShutDownSock, this, 1); // Create an optional packet sink to receive these packets Ptr sink2 = Socket::CreateSocket(c.Get(6), tid); diff --git a/src/internet/test/tcp-advertised-window-test.cc b/src/internet/test/tcp-advertised-window-test.cc index cc1e911cc..7da6b969b 100644 --- a/src/internet/test/tcp-advertised-window-test.cc +++ b/src/internet/test/tcp-advertised-window-test.cc @@ -323,7 +323,7 @@ TcpAdvertisedWindowTest::ConfigureEnvironment() TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(m_pktCount); SetPropagationDelay(MilliSeconds(50)); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); SetAppPktSize(m_pktSize); } @@ -410,7 +410,7 @@ TcpAdvWindowOnLossTest::ConfigureEnvironment() TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(m_pktCount); SetPropagationDelay(MilliSeconds(50)); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); SetAppPktSize(m_pktSize); } diff --git a/src/internet/test/tcp-bbr-test.cc b/src/internet/test/tcp-bbr-test.cc index e36279e50..fea07d3cb 100644 --- a/src/internet/test/tcp-bbr-test.cc +++ b/src/internet/test/tcp-bbr-test.cc @@ -51,7 +51,7 @@ TcpBbrPacingEnableTest::TcpBbrPacingEnableTest(bool pacing, const std::string& n void TcpBbrPacingEnableTest::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpBbrPacingEnableTest::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpBbrPacingEnableTest::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } @@ -105,7 +105,7 @@ TcpBbrCheckGainValuesTest::TcpBbrCheckGainValuesTest(TcpBbr::BbrMode_t state, void TcpBbrCheckGainValuesTest::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpBbrCheckGainValuesTest::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpBbrCheckGainValuesTest::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } diff --git a/src/internet/test/tcp-bic-test.cc b/src/internet/test/tcp-bic-test.cc index 4fb81277c..9f8b4ec0c 100644 --- a/src/internet/test/tcp-bic-test.cc +++ b/src/internet/test/tcp-bic-test.cc @@ -86,7 +86,7 @@ TcpBicIncrementTest::DoRun() m_state->m_segmentSize = m_segmentSize; m_state->m_ssThresh = m_ssThresh; - Simulator::Schedule(Seconds(0.0), &TcpBicIncrementTest::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpBicIncrementTest::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } @@ -235,7 +235,7 @@ TcpBicDecrementTest::DoRun() m_state->m_cWnd = m_cWnd; m_state->m_segmentSize = m_segmentSize; - Simulator::Schedule(Seconds(0.0), &TcpBicDecrementTest::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpBicDecrementTest::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } diff --git a/src/internet/test/tcp-bytes-in-flight-test.cc b/src/internet/test/tcp-bytes-in-flight-test.cc index d4613fd66..225eb6601 100644 --- a/src/internet/test/tcp-bytes-in-flight-test.cc +++ b/src/internet/test/tcp-bytes-in-flight-test.cc @@ -121,7 +121,7 @@ TcpBytesInFlightTest::ConfigureEnvironment() TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(30); SetPropagationDelay(MilliSeconds(50)); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); Config::SetDefault("ns3::TcpSocketBase::Sack", BooleanValue(false)); } diff --git a/src/internet/test/tcp-cong-avoid-test.cc b/src/internet/test/tcp-cong-avoid-test.cc index 583f3b407..47e3f135a 100644 --- a/src/internet/test/tcp-cong-avoid-test.cc +++ b/src/internet/test/tcp-cong-avoid-test.cc @@ -123,7 +123,7 @@ TcpNewRenoCongAvoidNormalTest::CWndTrace(uint32_t oldValue, uint32_t newValue) if (!m_event.IsPending()) { - m_event = Simulator::Schedule(Seconds(1.0), &TcpNewRenoCongAvoidNormalTest::Check, this); + m_event = Simulator::Schedule(Seconds(1), &TcpNewRenoCongAvoidNormalTest::Check, this); } m_increment += newValue - oldValue; @@ -155,7 +155,7 @@ TcpNewRenoCongAvoidNormalTest::Check() m_increment = 0; - m_event = Simulator::Schedule(Seconds(1.0), &TcpNewRenoCongAvoidNormalTest::Check, this); + m_event = Simulator::Schedule(Seconds(1), &TcpNewRenoCongAvoidNormalTest::Check, this); } void diff --git a/src/internet/test/tcp-dctcp-test.cc b/src/internet/test/tcp-dctcp-test.cc index 3bafbbb46..aa7818655 100644 --- a/src/internet/test/tcp-dctcp-test.cc +++ b/src/internet/test/tcp-dctcp-test.cc @@ -606,7 +606,7 @@ TcpDctcpToLinuxReno::TcpDctcpToLinuxReno(uint32_t cWnd, void TcpDctcpToLinuxReno::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpDctcpToLinuxReno::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpDctcpToLinuxReno::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } diff --git a/src/internet/test/tcp-fast-retr-test.cc b/src/internet/test/tcp-fast-retr-test.cc index 28a96ed0d..6a67a2d00 100644 --- a/src/internet/test/tcp-fast-retr-test.cc +++ b/src/internet/test/tcp-fast-retr-test.cc @@ -132,7 +132,7 @@ Ptr TcpFastRetrTest::CreateSenderSocket(Ptr node) { Ptr socket = TcpGeneralTest::CreateSenderSocket(node); - socket->SetAttribute("MinRto", TimeValue(Seconds(10.0))); + socket->SetAttribute("MinRto", TimeValue(Seconds(10))); return socket; } diff --git a/src/internet/test/tcp-general-test.cc b/src/internet/test/tcp-general-test.cc index a2be715a0..b364ef4fc 100644 --- a/src/internet/test/tcp-general-test.cc +++ b/src/internet/test/tcp-general-test.cc @@ -237,7 +237,7 @@ TcpGeneralTest::DoRun() m_receiverSocket->Listen(); m_receiverSocket->ShutdownSend(); - Simulator::Schedule(Seconds(0.0), &TcpGeneralTest::DoConnect, this); + Simulator::Schedule(Seconds(0), &TcpGeneralTest::DoConnect, this); Simulator::ScheduleWithContext(nodes.Get(0)->GetId(), m_startTime, &TcpGeneralTest::SendPacket, diff --git a/src/internet/test/tcp-ledbat-test.cc b/src/internet/test/tcp-ledbat-test.cc index fe6b6eaba..0d90e1edc 100644 --- a/src/internet/test/tcp-ledbat-test.cc +++ b/src/internet/test/tcp-ledbat-test.cc @@ -86,7 +86,7 @@ TcpLedbatToNewReno::TcpLedbatToNewReno(uint32_t cWnd, void TcpLedbatToNewReno::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpLedbatToNewReno::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpLedbatToNewReno::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } @@ -187,7 +187,7 @@ TcpLedbatIncrementTest::TcpLedbatIncrementTest(uint32_t cWnd, void TcpLedbatIncrementTest::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpLedbatIncrementTest::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpLedbatIncrementTest::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } @@ -289,7 +289,7 @@ TcpLedbatDecrementTest::TcpLedbatDecrementTest(uint32_t cWnd, void TcpLedbatDecrementTest::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpLedbatDecrementTest::ExecuteTest, this); + Simulator::Schedule(Seconds(0), &TcpLedbatDecrementTest::ExecuteTest, this); Simulator::Run(); Simulator::Destroy(); } diff --git a/src/internet/test/tcp-rate-ops-test.cc b/src/internet/test/tcp-rate-ops-test.cc index 94bfb9430..3f6c347a9 100644 --- a/src/internet/test/tcp-rate-ops-test.cc +++ b/src/internet/test/tcp-rate-ops-test.cc @@ -320,7 +320,7 @@ TcpRateLinuxWithSocketsTest::ConfigureEnvironment() TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(300); SetPropagationDelay(MilliSeconds(50)); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); Config::SetDefault("ns3::TcpSocketBase::Sack", BooleanValue(m_sackEnabled)); } @@ -482,7 +482,7 @@ TcpRateLinuxWithBufferTest::TcpRateLinuxWithBufferTest(uint32_t segmentSize, std void TcpRateLinuxWithBufferTest::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpRateLinuxWithBufferTest::TestWithSackBlocks, this); + Simulator::Schedule(Seconds(0), &TcpRateLinuxWithBufferTest::TestWithSackBlocks, this); Simulator::Run(); Simulator::Destroy(); } diff --git a/src/internet/test/tcp-rtt-estimation.cc b/src/internet/test/tcp-rtt-estimation.cc index 721b8e13b..f71039b28 100644 --- a/src/internet/test/tcp-rtt-estimation.cc +++ b/src/internet/test/tcp-rtt-estimation.cc @@ -78,7 +78,7 @@ TcpRttEstimationTest::ConfigureEnvironment() TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(m_pktCount); SetPropagationDelay(MilliSeconds(50)); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); SetMTU(500); } diff --git a/src/internet/test/tcp-tx-buffer-test.cc b/src/internet/test/tcp-tx-buffer-test.cc index e7366a500..806b21c88 100644 --- a/src/internet/test/tcp-tx-buffer-test.cc +++ b/src/internet/test/tcp-tx-buffer-test.cc @@ -57,14 +57,14 @@ TcpTxBufferTestCase::TcpTxBufferTestCase() void TcpTxBufferTestCase::DoRun() { - Simulator::Schedule(Seconds(0.0), &TcpTxBufferTestCase::TestIsLost, this); + Simulator::Schedule(Seconds(0), &TcpTxBufferTestCase::TestIsLost, this); /* * Cases for new block: * -> is exactly the same as stored * -> starts over the boundary, but ends earlier * -> starts over the boundary, but ends after */ - Simulator::Schedule(Seconds(0.0), &TcpTxBufferTestCase::TestNewBlock, this); + Simulator::Schedule(Seconds(0), &TcpTxBufferTestCase::TestNewBlock, this); /* * Cases for transmitted block: @@ -75,8 +75,8 @@ TcpTxBufferTestCase::DoRun() * -> starts inside a packet, ends earlier in the same packet * -> starts inside a packet, ends in another packet */ - Simulator::Schedule(Seconds(0.0), &TcpTxBufferTestCase::TestTransmittedBlock, this); - Simulator::Schedule(Seconds(0.0), &TcpTxBufferTestCase::TestNextSeg, this); + Simulator::Schedule(Seconds(0), &TcpTxBufferTestCase::TestTransmittedBlock, this); + Simulator::Schedule(Seconds(0), &TcpTxBufferTestCase::TestNextSeg, this); /* * Case for transmitted block: @@ -85,7 +85,7 @@ TcpTxBufferTestCase::DoRun() * -> during retransmission, the sender tries to send a full segment but it * should stop to merge items when they have different values for m_lost. */ - Simulator::Schedule(Seconds(0.0), + Simulator::Schedule(Seconds(0), &TcpTxBufferTestCase::TestMergeItemsWhenGetTransmittedSegment, this); diff --git a/src/internet/test/tcp-zero-window-test.cc b/src/internet/test/tcp-zero-window-test.cc index e40d12174..104f0ef5c 100644 --- a/src/internet/test/tcp-zero-window-test.cc +++ b/src/internet/test/tcp-zero-window-test.cc @@ -72,7 +72,7 @@ TcpZeroWindowTest::ConfigureEnvironment() TcpGeneralTest::ConfigureEnvironment(); SetAppPktCount(20); SetMTU(500); - SetTransmitStart(Seconds(2.0)); + SetTransmitStart(Seconds(2)); SetPropagationDelay(MilliSeconds(50)); } @@ -95,7 +95,7 @@ TcpZeroWindowTest::CreateReceiverSocket(Ptr node) Ptr socket = TcpGeneralTest::CreateReceiverSocket(node); socket->SetAttribute("RcvBufSize", UintegerValue(0)); - Simulator::Schedule(Seconds(10.0), &TcpZeroWindowTest::IncreaseBufSize, this); + Simulator::Schedule(Seconds(10), &TcpZeroWindowTest::IncreaseBufSize, this); return socket; } diff --git a/src/lr-wpan/examples/lr-wpan-active-scan.cc b/src/lr-wpan/examples/lr-wpan-active-scan.cc index 6c142ac14..fdbc2b5fb 100644 --- a/src/lr-wpan/examples/lr-wpan-active-scan.cc +++ b/src/lr-wpan/examples/lr-wpan-active-scan.cc @@ -144,7 +144,7 @@ main(int argc, char* argv[]) params.m_sfrmOrd = 15; params.m_logCh = 12; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coord1NetDevice->GetMac(), params); @@ -158,7 +158,7 @@ main(int argc, char* argv[]) params2.m_sfrmOrd = 15; params2.m_logCh = 14; Simulator::ScheduleWithContext(2, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coord2NetDevice->GetMac(), params2); @@ -175,7 +175,7 @@ main(int argc, char* argv[]) scanParams.m_scanDuration = 14; scanParams.m_scanType = MLMESCAN_ACTIVE; Simulator::ScheduleWithContext(1, - Seconds(3.0), + Seconds(3), &LrWpanMac::MlmeScanRequest, endNodeNetDevice->GetMac(), scanParams); diff --git a/src/lr-wpan/examples/lr-wpan-bootstrap.cc b/src/lr-wpan/examples/lr-wpan-bootstrap.cc index 2975f8d3f..0eab5444c 100644 --- a/src/lr-wpan/examples/lr-wpan-bootstrap.cc +++ b/src/lr-wpan/examples/lr-wpan-bootstrap.cc @@ -442,7 +442,7 @@ main(int argc, char* argv[]) params.m_logCh = 12; Simulator::ScheduleWithContext(coor1Device->GetNode()->GetId(), - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coor1Device->GetMac(), params); @@ -456,7 +456,7 @@ main(int argc, char* argv[]) params2.m_logCh = 14; Simulator::ScheduleWithContext(coor2Device->GetNode()->GetId(), - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coor2Device->GetMac(), params2); diff --git a/src/lr-wpan/examples/lr-wpan-data.cc b/src/lr-wpan/examples/lr-wpan-data.cc index b8bff2e44..22bd0f04b 100644 --- a/src/lr-wpan/examples/lr-wpan-data.cc +++ b/src/lr-wpan/examples/lr-wpan-data.cc @@ -196,7 +196,7 @@ main(int argc, char* argv[]) params.m_txOptions = TX_OPTION_ACK; // dev0->GetMac ()->McpsDataRequest (params, p0); Simulator::ScheduleWithContext(1, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev0->GetMac(), params, @@ -213,7 +213,7 @@ main(int argc, char* argv[]) params.m_dstExtAddr = Mac64Address("00:00:00:00:00:00:00:01"); } Simulator::ScheduleWithContext(2, - Seconds(2.0), + Seconds(2), &LrWpanMac::McpsDataRequest, dev1->GetMac(), params, diff --git a/src/lr-wpan/examples/lr-wpan-ed-scan.cc b/src/lr-wpan/examples/lr-wpan-ed-scan.cc index 126c219cf..8f35c5dad 100644 --- a/src/lr-wpan/examples/lr-wpan-ed-scan.cc +++ b/src/lr-wpan/examples/lr-wpan-ed-scan.cc @@ -122,7 +122,7 @@ main(int argc, char* argv[]) params.m_sfrmOrd = 3; params.m_logCh = 12; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, dev0->GetMac(), params); @@ -135,7 +135,7 @@ main(int argc, char* argv[]) params2.m_sfrmOrd = 3; params2.m_logCh = 14; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, dev2->GetMac(), params2); @@ -152,7 +152,7 @@ main(int argc, char* argv[]) scanParams.m_scanDuration = 14; scanParams.m_scanType = MLMESCAN_ED; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeScanRequest, dev1->GetMac(), scanParams); diff --git a/src/lr-wpan/examples/lr-wpan-mlme.cc b/src/lr-wpan/examples/lr-wpan-mlme.cc index 10a10df04..47e7404e3 100644 --- a/src/lr-wpan/examples/lr-wpan-mlme.cc +++ b/src/lr-wpan/examples/lr-wpan-mlme.cc @@ -152,7 +152,7 @@ main(int argc, char* argv[]) params.m_bcnOrd = 14; params.m_sfrmOrd = 6; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, dev0->GetMac(), params); diff --git a/src/lr-wpan/examples/lr-wpan-orphan-scan.cc b/src/lr-wpan/examples/lr-wpan-orphan-scan.cc index 9987c79ce..d0e627803 100644 --- a/src/lr-wpan/examples/lr-wpan-orphan-scan.cc +++ b/src/lr-wpan/examples/lr-wpan-orphan-scan.cc @@ -173,7 +173,7 @@ main(int argc, char* argv[]) params.m_sfrmOrd = 15; params.m_logCh = 12; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coord1NetDevice->GetMac(), params); @@ -192,7 +192,7 @@ main(int argc, char* argv[]) scanParams.m_scanChannels = 0x7800; scanParams.m_scanType = MLMESCAN_ORPHAN; Simulator::ScheduleWithContext(1, - Seconds(3.0), + Seconds(3), &LrWpanMac::MlmeScanRequest, endNodeNetDevice->GetMac(), scanParams); diff --git a/src/lr-wpan/examples/lr-wpan-phy-test.cc b/src/lr-wpan/examples/lr-wpan-phy-test.cc index 903380d78..81a735de8 100644 --- a/src/lr-wpan/examples/lr-wpan-phy-test.cc +++ b/src/lr-wpan/examples/lr-wpan-phy-test.cc @@ -89,9 +89,9 @@ main(int argc, char* argv[]) receiver->SetPdDataIndicationCallback(MakeCallback(&ReceivePdDataIndication)); - Simulator::Schedule(Seconds(1.0), &SendOnePacket, sender, receiver); + Simulator::Schedule(Seconds(1), &SendOnePacket, sender, receiver); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); diff --git a/src/lr-wpan/model/lr-wpan-phy.cc b/src/lr-wpan/model/lr-wpan-phy.cc index faef8e9ca..3c2ea8559 100644 --- a/src/lr-wpan/model/lr-wpan-phy.cc +++ b/src/lr-wpan/model/lr-wpan-phy.cc @@ -1705,8 +1705,8 @@ LrWpanPhy::SetPhyOption(PhyOption phyOption) } m_edPower.averagePower = 0.0; - m_edPower.lastUpdate = Seconds(0.0); - m_edPower.measurementLength = Seconds(0.0); + m_edPower.lastUpdate = Seconds(0); + m_edPower.measurementLength = Seconds(0); // TODO: Change the limits Rx sensitivity when other modulations are supported // Currently, only O-QPSK 250kbps is supported and its maximum possible sensitivity is diff --git a/src/lr-wpan/test/lr-wpan-ifs-test.cc b/src/lr-wpan/test/lr-wpan-ifs-test.cc index b27a3880c..48ff32963 100644 --- a/src/lr-wpan/test/lr-wpan-ifs-test.cc +++ b/src/lr-wpan/test/lr-wpan-ifs-test.cc @@ -271,7 +271,7 @@ LrWpanDataIfsTestCase::DoRun() //////////////////////// SIFS /////////////////////////// Simulator::ScheduleWithContext(1, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev0->GetMac(), params, @@ -293,7 +293,7 @@ LrWpanDataIfsTestCase::DoRun() p0 = Create(8); Simulator::ScheduleWithContext(1, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev0->GetMac(), params, @@ -316,7 +316,7 @@ LrWpanDataIfsTestCase::DoRun() p0 = Create(2); Simulator::ScheduleWithContext(1, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev0->GetMac(), params, @@ -339,7 +339,7 @@ LrWpanDataIfsTestCase::DoRun() p0 = Create(8); Simulator::ScheduleWithContext(1, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev0->GetMac(), params, @@ -377,7 +377,7 @@ LrWpanDataIfsTestCase::DoRun() params.m_msduHandle = 0; Simulator::ScheduleWithContext(1, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev0->GetMac(), params, diff --git a/src/lr-wpan/test/lr-wpan-mac-test.cc b/src/lr-wpan/test/lr-wpan-mac-test.cc index a7ff08fab..ffb4c4d06 100644 --- a/src/lr-wpan/test/lr-wpan-mac-test.cc +++ b/src/lr-wpan/test/lr-wpan-mac-test.cc @@ -263,7 +263,7 @@ TestRxOffWhenIdleAfterCsmaFailure::DoRun() params.m_dstAddr = Mac16Address("00:02"); Simulator::ScheduleWithContext(2, - Seconds(0.0), + Seconds(0), &LrWpanMac::McpsDataRequest, dev2->GetMac(), params, @@ -437,7 +437,7 @@ TestActiveScanPanDescriptors::DoRun() params.m_sfrmOrd = 15; params.m_logCh = 12; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coord1NetDevice->GetMac(), params); @@ -460,7 +460,7 @@ TestActiveScanPanDescriptors::DoRun() params2.m_sfrmOrd = 15; params2.m_logCh = 14; Simulator::ScheduleWithContext(2, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coord2NetDevice->GetMac(), params2); @@ -477,7 +477,7 @@ TestActiveScanPanDescriptors::DoRun() scanParams.m_scanDuration = 14; scanParams.m_scanType = MLMESCAN_ACTIVE; Simulator::ScheduleWithContext(1, - Seconds(3.0), + Seconds(3), &LrWpanMac::MlmeScanRequest, endNodeNetDevice->GetMac(), scanParams); @@ -660,7 +660,7 @@ TestOrphanScan::DoRun() params.m_sfrmOrd = 15; params.m_logCh = 12; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, coord1NetDevice->GetMac(), params); @@ -679,7 +679,7 @@ TestOrphanScan::DoRun() scanParams.m_scanChannels = 0x7800; scanParams.m_scanType = MLMESCAN_ORPHAN; Simulator::ScheduleWithContext(1, - Seconds(3.0), + Seconds(3), &LrWpanMac::MlmeScanRequest, endNodeNetDevice->GetMac(), scanParams); diff --git a/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc b/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc index cd3a4f6d4..d7e09276b 100644 --- a/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc +++ b/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc @@ -243,7 +243,7 @@ LrWpanSlottedCsmacaTestCase::DoRun() params.m_bcnOrd = 14; params.m_sfrmOrd = 6; Simulator::ScheduleWithContext(1, - Seconds(2.0), + Seconds(2), &LrWpanMac::MlmeStartRequest, dev0->GetMac(), params); diff --git a/src/lte/doc/source/lte-user.rst b/src/lte/doc/source/lte-user.rst index d2cdc6856..dbf50fa3f 100644 --- a/src/lte/doc/source/lte-user.rst +++ b/src/lte/doc/source/lte-user.rst @@ -481,7 +481,7 @@ In order to activate the fading module (which is not active by default) the foll And for setting the parameters:: lteHelper->SetFadingModelAttribute("TraceFilename", StringValue("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); - lteHelper->SetFadingModelAttribute("TraceLength", TimeValue(Seconds(10.0))); + lteHelper->SetFadingModelAttribute("TraceLength", TimeValue(Seconds(10))); lteHelper->SetFadingModelAttribute("SamplesNum", UintegerValue(10000)); lteHelper->SetFadingModelAttribute("WindowSize", TimeValue(Seconds(0.5))); lteHelper->SetFadingModelAttribute("RbNum", UintegerValue(100)); @@ -939,7 +939,7 @@ UdpClient application on the remote host, and a PacketSink on the LTE UE That's all! You can now start your simulation as usual:: - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); diff --git a/src/lte/examples/lena-deactivate-bearer.cc b/src/lte/examples/lena-deactivate-bearer.cc index fb7b03382..0e3b40a2d 100644 --- a/src/lte/examples/lena-deactivate-bearer.cc +++ b/src/lte/examples/lena-deactivate-bearer.cc @@ -223,7 +223,7 @@ main(int argc, char* argv[]) 2); // stop simulation after 3 seconds - Simulator::Stop(Seconds(3.0)); + Simulator::Stop(Seconds(3)); Simulator::Run(); /*GtkConfigStore config; diff --git a/src/lte/examples/lena-distributed-ffr.cc b/src/lte/examples/lena-distributed-ffr.cc index 8d3a5b6d6..02fd9d406 100644 --- a/src/lte/examples/lena-distributed-ffr.cc +++ b/src/lte/examples/lena-distributed-ffr.cc @@ -280,7 +280,7 @@ main(int argc, char* argv[]) UdpClientHelper dlClientHelper(ueIpIfaces.GetAddress(u), dlPort); dlClientHelper.SetAttribute("MaxPackets", UintegerValue(1000000)); - dlClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1.0))); + dlClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1))); clientApps.Add(dlClientHelper.Install(remoteHost)); PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), dlPort)); @@ -288,7 +288,7 @@ main(int argc, char* argv[]) UdpClientHelper ulClientHelper(remoteHostAddr, ulPort); ulClientHelper.SetAttribute("MaxPackets", UintegerValue(1000000)); - ulClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1.0))); + ulClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1))); clientApps.Add(ulClientHelper.Install(ue)); PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), ulPort)); diff --git a/src/lte/examples/lena-fading.cc b/src/lte/examples/lena-fading.cc index 65f42ddcc..21a1ea1c9 100644 --- a/src/lte/examples/lena-fading.cc +++ b/src/lte/examples/lena-fading.cc @@ -71,7 +71,7 @@ main(int argc, char* argv[]) // - 10,000 samples // - 0.5 seconds for window size // - 100 RB - lteHelper->SetFadingModelAttribute("TraceLength", TimeValue(Seconds(10.0))); + lteHelper->SetFadingModelAttribute("TraceLength", TimeValue(Seconds(10))); lteHelper->SetFadingModelAttribute("SamplesNum", UintegerValue(10000)); lteHelper->SetFadingModelAttribute("WindowSize", TimeValue(Seconds(0.5))); lteHelper->SetFadingModelAttribute("RbNum", UintegerValue(100)); diff --git a/src/lte/examples/lena-ipv6-addr-conf.cc b/src/lte/examples/lena-ipv6-addr-conf.cc index c69ecc29a..ae28d6378 100644 --- a/src/lte/examples/lena-ipv6-addr-conf.cc +++ b/src/lte/examples/lena-ipv6-addr-conf.cc @@ -122,25 +122,25 @@ main(int argc, char* argv[]) ApplicationContainer serverApps = echoServer.Install(remoteHost); - serverApps.Start(Seconds(4.0)); - serverApps.Stop(Seconds(20.0)); + serverApps.Start(Seconds(4)); + serverApps.Stop(Seconds(20)); UdpEchoClientHelper echoClient1(remoteHostAddr, 9); UdpEchoClientHelper echoClient2(remoteHostAddr, 9); echoClient1.SetAttribute("MaxPackets", UintegerValue(1000)); - echoClient1.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient1.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient1.SetAttribute("PacketSize", UintegerValue(1024)); echoClient2.SetAttribute("MaxPackets", UintegerValue(1000)); - echoClient2.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient2.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient2.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps1 = echoClient1.Install(ueNodes.Get(0)); ApplicationContainer clientApps2 = echoClient2.Install(ueNodes.Get(1)); - clientApps1.Start(Seconds(4.0)); - clientApps1.Stop(Seconds(14.0)); + clientApps1.Start(Seconds(4)); + clientApps1.Stop(Seconds(14)); clientApps2.Start(Seconds(4.5)); clientApps2.Stop(Seconds(14.5)); diff --git a/src/lte/examples/lena-ipv6-ue-rh.cc b/src/lte/examples/lena-ipv6-ue-rh.cc index 4ae32d0d7..26cd9bde9 100644 --- a/src/lte/examples/lena-ipv6-ue-rh.cc +++ b/src/lte/examples/lena-ipv6-ue-rh.cc @@ -120,25 +120,25 @@ main(int argc, char* argv[]) ApplicationContainer serverApps = echoServer.Install(remoteHost); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(20.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(20)); UdpEchoClientHelper echoClient1(remoteHostAddr, 9); UdpEchoClientHelper echoClient2(remoteHostAddr, 9); echoClient1.SetAttribute("MaxPackets", UintegerValue(1000)); - echoClient1.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient1.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient1.SetAttribute("PacketSize", UintegerValue(1024)); echoClient2.SetAttribute("MaxPackets", UintegerValue(1000)); - echoClient2.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient2.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient2.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps1 = echoClient1.Install(ueNodes.Get(0)); ApplicationContainer clientApps2 = echoClient2.Install(ueNodes.Get(1)); - clientApps1.Start(Seconds(1.0)); - clientApps1.Stop(Seconds(14.0)); + clientApps1.Start(Seconds(1)); + clientApps1.Stop(Seconds(14)); clientApps2.Start(Seconds(1.5)); clientApps2.Stop(Seconds(14.5)); diff --git a/src/lte/examples/lena-ipv6-ue-ue.cc b/src/lte/examples/lena-ipv6-ue-ue.cc index 10edb069c..74e302ef1 100644 --- a/src/lte/examples/lena-ipv6-ue-ue.cc +++ b/src/lte/examples/lena-ipv6-ue-ue.cc @@ -119,25 +119,25 @@ main(int argc, char* argv[]) ApplicationContainer serverApps = echoServer.Install(ueNodes.Get(0)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(20.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(20)); UdpEchoClientHelper echoClient1(ueIpIface.GetAddress(0, 1), 9); UdpEchoClientHelper echoClient2(ueIpIface.GetAddress(0, 1), 9); echoClient1.SetAttribute("MaxPackets", UintegerValue(1000)); - echoClient1.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient1.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient1.SetAttribute("PacketSize", UintegerValue(1024)); echoClient2.SetAttribute("MaxPackets", UintegerValue(1000)); - echoClient2.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient2.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient2.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps1 = echoClient1.Install(remoteHost); ApplicationContainer clientApps2 = echoClient2.Install(ueNodes.Get(1)); - clientApps1.Start(Seconds(1.0)); - clientApps1.Stop(Seconds(14.0)); + clientApps1.Start(Seconds(1)); + clientApps1.Stop(Seconds(14)); clientApps2.Start(Seconds(1.5)); clientApps2.Stop(Seconds(14.5)); diff --git a/src/lte/examples/lena-x2-handover-measures.cc b/src/lte/examples/lena-x2-handover-measures.cc index f531478c3..c2bd0c4f7 100644 --- a/src/lte/examples/lena-x2-handover-measures.cc +++ b/src/lte/examples/lena-x2-handover-measures.cc @@ -295,9 +295,9 @@ main(int argc, char* argv[]) lteHelper->EnableRlcTraces(); lteHelper->EnablePdcpTraces(); Ptr rlcStats = lteHelper->GetRlcStats(); - rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(1.0))); + rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(1))); Ptr pdcpStats = lteHelper->GetPdcpStats(); - pdcpStats->SetAttribute("EpochDuration", TimeValue(Seconds(1.0))); + pdcpStats->SetAttribute("EpochDuration", TimeValue(Seconds(1))); // connect custom trace sinks for RRC connection establishment and handover notification Config::Connect("/NodeList/*/DeviceList/*/LteEnbRrc/ConnectionEstablished", diff --git a/src/lte/test/epc-test-s1u-downlink.cc b/src/lte/test/epc-test-s1u-downlink.cc index 52a0bfb7e..b19f848cb 100644 --- a/src/lte/test/epc-test-s1u-downlink.cc +++ b/src/lte/test/epc-test-s1u-downlink.cc @@ -202,8 +202,8 @@ EpcS1uDlTestCase::DoRun() PacketSinkHelper packetSinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer apps = packetSinkHelper.Install(ue); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); enbit->ues[u].serverApp = apps.Get(0)->GetObject(); Time interPacketInterval = Seconds(0.01); @@ -212,8 +212,8 @@ EpcS1uDlTestCase::DoRun() client.SetAttribute("Interval", TimeValue(interPacketInterval)); client.SetAttribute("PacketSize", UintegerValue(enbit->ues[u].pktSize)); apps = client.Install(remoteHost); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(10)); enbit->ues[u].clientApp = apps.Get(0); uint64_t imsi = ++imsiCounter; diff --git a/src/lte/test/epc-test-s1u-uplink.cc b/src/lte/test/epc-test-s1u-uplink.cc index e1b5df55b..ecf9db6dc 100644 --- a/src/lte/test/epc-test-s1u-uplink.cc +++ b/src/lte/test/epc-test-s1u-uplink.cc @@ -121,7 +121,7 @@ EpsBearerTagUdpClient::GetTypeId() MakeUintegerChecker()) .AddAttribute("Interval", "The time to wait between packets", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&EpsBearerTagUdpClient::m_interval), MakeTimeChecker()) .AddAttribute("RemoteAddress", @@ -196,7 +196,7 @@ EpsBearerTagUdpClient::StartApplication() } m_socket->SetRecvCallback(MakeNullCallback>()); - m_sendEvent = Simulator::Schedule(Seconds(0.0), &EpsBearerTagUdpClient::Send, this); + m_sendEvent = Simulator::Schedule(Seconds(0), &EpsBearerTagUdpClient::Send, this); } void @@ -435,8 +435,8 @@ EpcS1uUlTestCase::DoRun() "ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), udpSinkPort)); ApplicationContainer sinkApp = packetSinkHelper.Install(remoteHost); - sinkApp.Start(Seconds(1.0)); - sinkApp.Stop(Seconds(10.0)); + sinkApp.Start(Seconds(1)); + sinkApp.Stop(Seconds(10)); enbit->ues[u].serverApp = sinkApp.Get(0)->GetObject(); Time interPacketInterval = Seconds(0.01); @@ -451,8 +451,8 @@ EpcS1uUlTestCase::DoRun() ue->AddApplication(client); ApplicationContainer clientApp; clientApp.Add(client); - clientApp.Start(Seconds(2.0)); - clientApp.Stop(Seconds(10.0)); + clientApp.Start(Seconds(2)); + clientApp.Stop(Seconds(10)); enbit->ues[u].clientApp = client; uint64_t imsi = ++imsiCounter; diff --git a/src/lte/test/lte-test-aggregation-throughput-scale.cc b/src/lte/test/lte-test-aggregation-throughput-scale.cc index d2c0b6e71..42a7862fd 100644 --- a/src/lte/test/lte-test-aggregation-throughput-scale.cc +++ b/src/lte/test/lte-test-aggregation-throughput-scale.cc @@ -132,9 +132,9 @@ LteAggregationThroughputScaleTestCase::GetThroughput(uint8_t numberOfComponentCa pgwNode->AddApplication(client); apps.Add(client); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); - Simulator::Stop(Seconds(2.0)); + Simulator::Stop(Seconds(2)); Simulator::Run(); m_actualCellId = ueDev->GetRrc()->GetCellId(); diff --git a/src/lte/test/lte-test-deactivate-bearer.cc b/src/lte/test/lte-test-deactivate-bearer.cc index 1019c29cf..e615129ab 100644 --- a/src/lte/test/lte-test-deactivate-bearer.cc +++ b/src/lte/test/lte-test-deactivate-bearer.cc @@ -330,7 +330,7 @@ LenaDeactivateBearerTestCase::DoRun() 2); // stop simulation after 3 seconds - Simulator::Stop(Seconds(3.0)); + Simulator::Stop(Seconds(3)); Simulator::Run(); diff --git a/src/lte/test/lte-test-downlink-sinr.cc b/src/lte/test/lte-test-downlink-sinr.cc index 3f4ce5dbe..fa474ca0e 100644 --- a/src/lte/test/lte-test-downlink-sinr.cc +++ b/src/lte/test/lte-test-downlink-sinr.cc @@ -254,7 +254,7 @@ LteDownlinkDataSinrTestCase::DoRun() ip4->cellId = pbCellId[4]; Simulator::Schedule(ti4, &LteSpectrumPhy::StartRx, dlPhy, ip4); - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); NS_LOG_INFO("Data Frame - Theoretical SINR: " << *m_expectedSinr); @@ -429,7 +429,7 @@ LteDownlinkCtrlSinrTestCase::DoRun() ip4->pss = false; Simulator::Schedule(ti4, &LteSpectrumPhy::StartRx, dlPhy, ip4); - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); NS_LOG_INFO("Ctrl Frame - Theoretical SINR: " << *m_expectedSinr); diff --git a/src/lte/test/lte-test-frequency-reuse.cc b/src/lte/test/lte-test-frequency-reuse.cc index fc02e9b32..99f0400a9 100644 --- a/src/lte/test/lte-test-frequency-reuse.cc +++ b/src/lte/test/lte-test-frequency-reuse.cc @@ -2112,7 +2112,7 @@ LteDistributedFfrAreaTestCase::DoRun() NS_LOG_LOGIC("installing UDP DL app for UE " << u); UdpClientHelper dlClientHelper(ueIpIfaces.GetAddress(u), dlPort); dlClientHelper.SetAttribute("MaxPackets", UintegerValue(1000000)); - dlClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1.0))); + dlClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1))); clientApps.Add(dlClientHelper.Install(remoteHost)); PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), dlPort)); @@ -2121,7 +2121,7 @@ LteDistributedFfrAreaTestCase::DoRun() NS_LOG_LOGIC("installing UDP UL app for UE " << u); UdpClientHelper ulClientHelper(remoteHostAddr, ulPort); ulClientHelper.SetAttribute("MaxPackets", UintegerValue(1000000)); - ulClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1.0))); + ulClientHelper.SetAttribute("Interval", TimeValue(MilliSeconds(1))); clientApps.Add(ulClientHelper.Install(ue)); PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), ulPort)); diff --git a/src/lte/test/lte-test-ipv6-routing.cc b/src/lte/test/lte-test-ipv6-routing.cc index 6f3cb5440..5ef754445 100644 --- a/src/lte/test/lte-test-ipv6-routing.cc +++ b/src/lte/test/lte-test-ipv6-routing.cc @@ -311,8 +311,8 @@ LteIpv6RoutingTestCase::DoRun() serverApps.Add(echoServer2.Install(ueNodes.Get(1))); serverApps.Add(echoServer3.Install(ueNodes.Get(2))); - serverApps.Start(Seconds(4.0)); - serverApps.Stop(Seconds(12.0)); + serverApps.Start(Seconds(4)); + serverApps.Stop(Seconds(12)); UdpEchoClientHelper echoClient1(m_remoteHostAddr, 10); UdpEchoClientHelper echoClient2(m_ueIpIface.GetAddress(1, 1), 11); @@ -334,14 +334,14 @@ LteIpv6RoutingTestCase::DoRun() ApplicationContainer clientApps2 = echoClient2.Install(ueNodes.Get(0)); ApplicationContainer clientApps3 = echoClient3.Install(ueNodes.Get(0)); - clientApps1.Start(Seconds(4.0)); - clientApps1.Stop(Seconds(6.0)); + clientApps1.Start(Seconds(4)); + clientApps1.Stop(Seconds(6)); clientApps2.Start(Seconds(6.1)); - clientApps2.Stop(Seconds(8.0)); + clientApps2.Stop(Seconds(8)); clientApps3.Start(Seconds(8.1)); - clientApps3.Stop(Seconds(10.0)); + clientApps3.Stop(Seconds(10)); // Set Cllback for Client Sent and Received packets Ptr ipL3 = (ueNodes.Get(0))->GetObject(); @@ -358,7 +358,7 @@ LteIpv6RoutingTestCase::DoRun() appPgw->TraceConnectWithoutContext("RxFromTun", MakeCallback(&LteIpv6RoutingTestCase::TunToPgw, this)); - Simulator::Schedule(Seconds(12.0), &LteIpv6RoutingTestCase::Checker, this); + Simulator::Schedule(Seconds(12), &LteIpv6RoutingTestCase::Checker, this); Simulator::Stop(Seconds(14)); Simulator::Run(); diff --git a/src/lte/test/lte-test-phy-error-model.cc b/src/lte/test/lte-test-phy-error-model.cc index ce81c8a25..fb1ddf5b4 100644 --- a/src/lte/test/lte-test-phy-error-model.cc +++ b/src/lte/test/lte-test-phy-error-model.cc @@ -230,7 +230,7 @@ LenaDataPhyErrorModelTestCase::DoRun() uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0)); } - Time statsDuration = Seconds(1.0); + Time statsDuration = Seconds(1); Simulator::Stop(m_statsStartTime + statsDuration - Seconds(0.0001)); lena->EnableRlcTraces(); @@ -392,7 +392,7 @@ LenaDlCtrlPhyErrorModelTestCase::DoRun() uePhy->SetAttribute("TxPower", DoubleValue(23.0)); uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0)); - Time statsDuration = Seconds(1.0); + Time statsDuration = Seconds(1); Simulator::Stop(m_statsStartTime + statsDuration - Seconds(0.0001)); lena->EnableRlcTraces(); diff --git a/src/lte/test/lte-test-primary-cell-change.cc b/src/lte/test/lte-test-primary-cell-change.cc index d9c34c73e..eb0a2d62e 100644 --- a/src/lte/test/lte-test-primary-cell-change.cc +++ b/src/lte/test/lte-test-primary-cell-change.cc @@ -182,10 +182,10 @@ LtePrimaryCellChangeTestCase::DoRun() ->GetCellId(); lteHelper->AddX2Interface(enbNodes); - lteHelper->HandoverRequest(Seconds(1.0), ueDev, sourceEnbDev, targetCellId); + lteHelper->HandoverRequest(Seconds(1), ueDev, sourceEnbDev, targetCellId); // Run simulation. - Simulator::Stop(Seconds(2.0)); + Simulator::Stop(Seconds(2)); Simulator::Run(); uint16_t expectedCellId = targetCellId; diff --git a/src/lte/test/lte-test-secondary-cell-selection.cc b/src/lte/test/lte-test-secondary-cell-selection.cc index 9150aa5d8..0ce903066 100644 --- a/src/lte/test/lte-test-secondary-cell-selection.cc +++ b/src/lte/test/lte-test-secondary-cell-selection.cc @@ -142,7 +142,7 @@ LteSecondaryCellSelectionTestCase::DoRun() MakeCallback(&LteSecondaryCellSelectionTestCase::ConnectionEstablishedCallback, this)); // Run simulation. - Simulator::Stop(Seconds(2.0)); + Simulator::Stop(Seconds(2)); Simulator::Run(); for (auto& it : enbDev->GetCcMap()) diff --git a/src/lte/test/lte-test-uplink-sinr.cc b/src/lte/test/lte-test-uplink-sinr.cc index fcead263b..efb5c003a 100644 --- a/src/lte/test/lte-test-uplink-sinr.cc +++ b/src/lte/test/lte-test-uplink-sinr.cc @@ -298,7 +298,7 @@ LteUplinkDataSinrTestCase::DoRun() ip4->cellId = pbCellId[5]; Simulator::Schedule(ti4, &LteSpectrumPhy::StartRx, ulPhy, ip4); - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); NS_LOG_INFO("Data Frame - Theoretical SINR: " << *m_expectedSinr); @@ -474,7 +474,7 @@ LteUplinkSrsSinrTestCase::DoRun() ip4->cellId = pbCellId[5]; Simulator::Schedule(ti4, &LteSpectrumPhy::StartRx, ulPhy, ip4); - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); NS_ASSERT_MSG(m_actualSinr, "no actual SINR reported"); diff --git a/src/mesh/examples/mesh-example.cc b/src/mesh/examples/mesh-example.cc index b339880c8..07804aecf 100644 --- a/src/mesh/examples/mesh-example.cc +++ b/src/mesh/examples/mesh-example.cc @@ -291,7 +291,7 @@ MeshTest::InstallApplication() UdpEchoServerHelper echoServer(portNumber); uint16_t sinkNodeId = m_xSize * m_ySize - 1; ApplicationContainer serverApps = echoServer.Install(nodes.Get(sinkNodeId)); - serverApps.Start(Seconds(1.0)); + serverApps.Start(Seconds(1)); serverApps.Stop(Seconds(m_totalTime + 1)); UdpEchoClientHelper echoClient(interfaces.GetAddress(sinkNodeId), portNumber); echoClient.SetAttribute("MaxPackets", @@ -302,7 +302,7 @@ MeshTest::InstallApplication() Ptr app = clientApps.Get(0)->GetObject(); app->TraceConnectWithoutContext("Tx", MakeCallback(&TxTrace)); app->TraceConnectWithoutContext("Rx", MakeCallback(&RxTrace)); - clientApps.Start(Seconds(1.0)); + clientApps.Start(Seconds(1)); clientApps.Stop(Seconds(m_totalTime + 1.5)); } diff --git a/src/mesh/model/dot11s/hwmp-rtable.h b/src/mesh/model/dot11s/hwmp-rtable.h index 1fbf37944..e12502d6c 100644 --- a/src/mesh/model/dot11s/hwmp-rtable.h +++ b/src/mesh/model/dot11s/hwmp-rtable.h @@ -54,7 +54,7 @@ class HwmpRtable : public Object uint32_t i = INTERFACE_ANY, uint32_t m = MAX_METRIC, uint32_t s = 0, - Time l = Seconds(0.0)); + Time l = Seconds(0)); /** * \returns True for valid route */ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression.cc b/src/mesh/test/dot11s/hwmp-reactive-regression.cc index 0d8f265d5..a045380ba 100644 --- a/src/mesh/test/dot11s/hwmp-reactive-regression.cc +++ b/src/mesh/test/dot11s/hwmp-reactive-regression.cc @@ -74,7 +74,7 @@ HwmpReactiveRegressionTest::CreateNodes() mobility.SetPositionAllocator(positionAlloc); mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel"); mobility.Install(*m_nodes); - Simulator::Schedule(Seconds(5.0), &HwmpReactiveRegressionTest::ResetPosition, this); + Simulator::Schedule(Seconds(5), &HwmpReactiveRegressionTest::ResetPosition, this); } void @@ -88,7 +88,7 @@ HwmpReactiveRegressionTest::InstallApplications() m_clientSocket->SetRecvCallback( MakeCallback(&HwmpReactiveRegressionTest::HandleReadClient, this)); Simulator::ScheduleWithContext(m_clientSocket->GetNode()->GetId(), - Seconds(2.0), + Seconds(2), &HwmpReactiveRegressionTest::SendData, this, m_clientSocket); diff --git a/src/mesh/test/dot11s/hwmp-simplest-regression.cc b/src/mesh/test/dot11s/hwmp-simplest-regression.cc index 96dbc2104..ce38d52d7 100644 --- a/src/mesh/test/dot11s/hwmp-simplest-regression.cc +++ b/src/mesh/test/dot11s/hwmp-simplest-regression.cc @@ -82,7 +82,7 @@ HwmpSimplestRegressionTest::CreateNodes() StringValue("RowFirst")); mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel"); mobility.Install(*m_nodes); - Simulator::Schedule(Seconds(10.0), &HwmpSimplestRegressionTest::ResetPosition, this); + Simulator::Schedule(Seconds(10), &HwmpSimplestRegressionTest::ResetPosition, this); } void @@ -108,7 +108,7 @@ HwmpSimplestRegressionTest::InstallApplications() m_clientSocket->SetRecvCallback( MakeCallback(&HwmpSimplestRegressionTest::HandleReadClient, this)); Simulator::ScheduleWithContext(m_clientSocket->GetNode()->GetId(), - Seconds(2.0), + Seconds(2), &HwmpSimplestRegressionTest::SendData, this, m_clientSocket); diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc b/src/mesh/test/dot11s/hwmp-target-flags-regression.cc index f1ef1a42a..cec9ee34e 100644 --- a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc +++ b/src/mesh/test/dot11s/hwmp-target-flags-regression.cc @@ -121,7 +121,7 @@ HwmpDoRfRegressionTest::InstallApplications() m_clientSocketB->Connect(InetSocketAddress(m_interfaces.GetAddress(0), 9)); m_clientSocketB->SetRecvCallback(MakeCallback(&HwmpDoRfRegressionTest::HandleReadClient, this)); Simulator::ScheduleWithContext(m_clientSocketB->GetNode()->GetId(), - Seconds(2.0), + Seconds(2), &HwmpDoRfRegressionTest::SendDataB, this, m_clientSocketB); @@ -193,7 +193,7 @@ HwmpDoRfRegressionTest::SendDataA(Ptr socket) socket->Send(Create(100)); m_sentPktsCounterA++; Simulator::ScheduleWithContext(socket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &HwmpDoRfRegressionTest::SendDataA, this, socket); @@ -208,7 +208,7 @@ HwmpDoRfRegressionTest::SendDataB(Ptr socket) socket->Send(Create(100)); m_sentPktsCounterB++; Simulator::ScheduleWithContext(socket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &HwmpDoRfRegressionTest::SendDataB, this, socket); @@ -223,7 +223,7 @@ HwmpDoRfRegressionTest::SendDataC(Ptr socket) socket->Send(Create(100)); m_sentPktsCounterC++; Simulator::ScheduleWithContext(socket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &HwmpDoRfRegressionTest::SendDataC, this, socket); diff --git a/src/mesh/test/flame/flame-regression.cc b/src/mesh/test/flame/flame-regression.cc index bd6544b42..55ae00e58 100644 --- a/src/mesh/test/flame/flame-regression.cc +++ b/src/mesh/test/flame/flame-regression.cc @@ -134,7 +134,7 @@ FlameRegressionTest::InstallApplications() m_clientSocket->Connect(InetSocketAddress(m_interfaces.GetAddress(0), 9)); m_clientSocket->SetRecvCallback(MakeCallback(&FlameRegressionTest::HandleReadClient, this)); Simulator::ScheduleWithContext(m_clientSocket->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &FlameRegressionTest::SendData, this, m_clientSocket); diff --git a/src/mesh/test/mesh-information-element-vector-test-suite.cc b/src/mesh/test/mesh-information-element-vector-test-suite.cc index 0cc9aa8cf..cec0c7848 100644 --- a/src/mesh/test/mesh-information-element-vector-test-suite.cc +++ b/src/mesh/test/mesh-information-element-vector-test-suite.cc @@ -73,10 +73,10 @@ MeshInformationElementVectorBist::DoRun() } { Ptr beaconTiming = Create(); - beaconTiming->AddNeighboursTimingElementUnit(1, Seconds(1.0), Seconds(4.0)); - beaconTiming->AddNeighboursTimingElementUnit(2, Seconds(2.0), Seconds(3.0)); - beaconTiming->AddNeighboursTimingElementUnit(3, Seconds(3.0), Seconds(2.0)); - beaconTiming->AddNeighboursTimingElementUnit(4, Seconds(4.0), Seconds(1.0)); + beaconTiming->AddNeighboursTimingElementUnit(1, Seconds(1), Seconds(4)); + beaconTiming->AddNeighboursTimingElementUnit(2, Seconds(2), Seconds(3)); + beaconTiming->AddNeighboursTimingElementUnit(3, Seconds(3), Seconds(2)); + beaconTiming->AddNeighboursTimingElementUnit(4, Seconds(4), Seconds(1)); vector.AddInformationElement(beaconTiming); } { diff --git a/src/mobility/examples/bonnmotion-ns2-example.cc b/src/mobility/examples/bonnmotion-ns2-example.cc index 216f20f52..0203bb9eb 100644 --- a/src/mobility/examples/bonnmotion-ns2-example.cc +++ b/src/mobility/examples/bonnmotion-ns2-example.cc @@ -66,9 +66,9 @@ main(int argc, char* argv[]) Ns2MobilityHelper ns2 = Ns2MobilityHelper(traceFile); ns2.Install(); - Simulator::Schedule(Seconds(0.0), &showPosition, n0, deltaTime); + Simulator::Schedule(Seconds(0), &showPosition, n0, deltaTime); - Simulator::Stop(Seconds(1000.0)); + Simulator::Stop(Seconds(1000)); Simulator::Run(); Simulator::Destroy(); return 0; diff --git a/src/mobility/examples/constant-mobility-example.cc b/src/mobility/examples/constant-mobility-example.cc index 5e822a095..f2ce28cca 100644 --- a/src/mobility/examples/constant-mobility-example.cc +++ b/src/mobility/examples/constant-mobility-example.cc @@ -80,11 +80,11 @@ main(int argc, char* argv[]) mob1->TraceConnectWithoutContext("CourseChange", MakeBoundCallback(&CourseChangeCallback)); // Schedule movements to node n1 - Simulator::ScheduleWithContext(n1->GetId(), Seconds(2.0), &MoveNode, n1, Vector(10, 0, 0)); + Simulator::ScheduleWithContext(n1->GetId(), Seconds(2), &MoveNode, n1, Vector(10, 0, 0)); - Simulator::ScheduleWithContext(n1->GetId(), Seconds(4.0), &MoveNode, n1, Vector(20, 0, 0)); + Simulator::ScheduleWithContext(n1->GetId(), Seconds(4), &MoveNode, n1, Vector(20, 0, 0)); - Simulator::ScheduleWithContext(n1->GetId(), Seconds(6.0), &MoveNode, n1, Vector(30, 0, 0)); + Simulator::ScheduleWithContext(n1->GetId(), Seconds(6), &MoveNode, n1, Vector(30, 0, 0)); Simulator::Stop(Seconds(10)); Simulator::Run(); diff --git a/src/mobility/examples/main-random-topology.cc b/src/mobility/examples/main-random-topology.cc index 8a03610fb..6f5a5d276 100644 --- a/src/mobility/examples/main-random-topology.cc +++ b/src/mobility/examples/main-random-topology.cc @@ -45,7 +45,7 @@ main(int argc, char* argv[]) Config::Connect("/NodeList/*/$ns3::MobilityModel/CourseChange", MakeCallback(&CourseChange)); - Simulator::Stop(Seconds(100.0)); + Simulator::Stop(Seconds(100)); Simulator::Run(); diff --git a/src/mobility/examples/main-random-walk.cc b/src/mobility/examples/main-random-walk.cc index fcb2fedbb..005152563 100644 --- a/src/mobility/examples/main-random-walk.cc +++ b/src/mobility/examples/main-random-walk.cc @@ -59,7 +59,7 @@ main(int argc, char* argv[]) mobility.InstallAll(); Config::Connect("/NodeList/*/$ns3::MobilityModel/CourseChange", MakeCallback(&CourseChange)); - Simulator::Stop(Seconds(100.0)); + Simulator::Stop(Seconds(100)); Simulator::Run(); diff --git a/src/mobility/examples/mobility-trace-example.cc b/src/mobility/examples/mobility-trace-example.cc index e833b176e..38accd993 100644 --- a/src/mobility/examples/mobility-trace-example.cc +++ b/src/mobility/examples/mobility-trace-example.cc @@ -50,7 +50,7 @@ main(int argc, char* argv[]) AsciiTraceHelper ascii; MobilityHelper::EnableAsciiAll(ascii.CreateFileStream("mobility-trace-example.mob")); - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/mobility/model/gauss-markov-mobility-model.cc b/src/mobility/model/gauss-markov-mobility-model.cc index c098d60ab..210bf2bdd 100644 --- a/src/mobility/model/gauss-markov-mobility-model.cc +++ b/src/mobility/model/gauss-markov-mobility-model.cc @@ -36,7 +36,7 @@ GaussMarkovMobilityModel::GetTypeId() MakeBoxChecker()) .AddAttribute("TimeStep", "Change current direction and speed after moving for this time.", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&GaussMarkovMobilityModel::m_timeStep), MakeTimeChecker()) .AddAttribute( @@ -161,7 +161,7 @@ GaussMarkovMobilityModel::DoWalk(Time delayLeft) nextPosition.z += speed.z * delayLeft.GetSeconds(); if (delayLeft.GetSeconds() < 0.0) { - delayLeft = Seconds(1.0); + delayLeft = Seconds(1); } // Make sure that the position by the next time step is still within the boundary. diff --git a/src/mobility/model/random-walk-2d-mobility-model.cc b/src/mobility/model/random-walk-2d-mobility-model.cc index 649f1349d..4a9d951f4 100644 --- a/src/mobility/model/random-walk-2d-mobility-model.cc +++ b/src/mobility/model/random-walk-2d-mobility-model.cc @@ -38,7 +38,7 @@ RandomWalk2dMobilityModel::GetTypeId() MakeRectangleChecker()) .AddAttribute("Time", "Change current direction and speed after moving for this delay.", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&RandomWalk2dMobilityModel::m_modeTime), MakeTimeChecker()) .AddAttribute("Distance", diff --git a/src/mobility/test/mobility-test-suite.cc b/src/mobility/test/mobility-test-suite.cc index b9826f570..00c77bb98 100644 --- a/src/mobility/test/mobility-test-suite.cc +++ b/src/mobility/test/mobility-test-suite.cc @@ -87,14 +87,14 @@ WaypointLazyNotifyFalse::DoRun() m_mob = CreateObject(); // LazyNotify should by default be false m_node->AggregateObject(m_mob); - Waypoint wpt(Seconds(0.0), Vector(0.0, 0.0, 0.0)); + Waypoint wpt(Seconds(0), Vector(0.0, 0.0, 0.0)); m_mob->AddWaypoint(wpt); - Waypoint wpt2(Seconds(10.0), Vector(10.0, 10.0, 10.0)); + Waypoint wpt2(Seconds(10), Vector(10.0, 10.0, 10.0)); m_mob->AddWaypoint(wpt2); - Waypoint wpt3(Seconds(20.0), Vector(20.0, 20.0, 20.0)); + Waypoint wpt3(Seconds(20), Vector(20.0, 20.0, 20.0)); m_mob->AddWaypoint(wpt3); - Simulator::Schedule(Seconds(5.0), &WaypointLazyNotifyFalse::TestXPosition, this, 5); + Simulator::Schedule(Seconds(5), &WaypointLazyNotifyFalse::TestXPosition, this, 5); Simulator::Run(); Simulator::Destroy(); } @@ -161,14 +161,14 @@ WaypointLazyNotifyTrue::DoRun() m_mob = CreateObject(); m_mob->SetAttributeFailSafe("LazyNotify", BooleanValue(true)); m_node->AggregateObject(m_mob); - Waypoint wpt(Seconds(0.0), Vector(0.0, 0.0, 0.0)); + Waypoint wpt(Seconds(0), Vector(0.0, 0.0, 0.0)); m_mob->AddWaypoint(wpt); - Waypoint wpt2(Seconds(10.0), Vector(10.0, 10.0, 10.0)); + Waypoint wpt2(Seconds(10), Vector(10.0, 10.0, 10.0)); m_mob->AddWaypoint(wpt2); - Waypoint wpt3(Seconds(20.0), Vector(20.0, 20.0, 20.0)); + Waypoint wpt3(Seconds(20), Vector(20.0, 20.0, 20.0)); m_mob->AddWaypoint(wpt3); - Simulator::Schedule(Seconds(15.0), &WaypointLazyNotifyTrue::TestXPosition, this, 15); + Simulator::Schedule(Seconds(15), &WaypointLazyNotifyTrue::TestXPosition, this, 15); Simulator::Run(); Simulator::Destroy(); } @@ -239,13 +239,13 @@ WaypointInitialPositionIsWaypoint::DoRun() m_mob1->SetAttributeFailSafe("InitialPositionIsWaypoint", BooleanValue(false)); m_mob1->SetPosition(Vector(10.0, 10.0, 10.0)); // At time 1s, there should be no waypoints - Simulator::Schedule(Seconds(1.0), + Simulator::Schedule(Seconds(1), &WaypointInitialPositionIsWaypoint::TestNumWaypoints, this, m_mob1, 0); // At time 15s, the model should still be at x position 10.0 - Simulator::Schedule(Seconds(15.0), + Simulator::Schedule(Seconds(15), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob1, @@ -255,19 +255,19 @@ WaypointInitialPositionIsWaypoint::DoRun() // after adding a waypoint. m_mob2 = CreateObject(); m_mob2->SetAttributeFailSafe("InitialPositionIsWaypoint", BooleanValue(false)); - Waypoint wpt21(Seconds(5.0), Vector(15.0, 15.0, 15.0)); + Waypoint wpt21(Seconds(5), Vector(15.0, 15.0, 15.0)); m_mob2->AddWaypoint(wpt21); - Waypoint wpt22(Seconds(10.0), Vector(20.0, 20.0, 20.0)); + Waypoint wpt22(Seconds(10), Vector(20.0, 20.0, 20.0)); m_mob2->AddWaypoint(wpt22); m_mob2->SetPosition(Vector(10.0, 10.0, 10.0)); // At time 3, no waypoints have been hit, so position should be 10 and // numWaypoints should be 2, or 1 excluding the next one - Simulator::Schedule(Seconds(3.0), + Simulator::Schedule(Seconds(3), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob2, 10.0); - Simulator::Schedule(Seconds(3.0), + Simulator::Schedule(Seconds(3), &WaypointInitialPositionIsWaypoint::TestNumWaypoints, this, m_mob2, @@ -275,12 +275,12 @@ WaypointInitialPositionIsWaypoint::DoRun() // At time 8, check that X position is 18 (i.e. position is interpolating // between 15 and 20) and there is one waypoint left, but we exclude // the next one so we test for zero waypoints - Simulator::Schedule(Seconds(8.0), + Simulator::Schedule(Seconds(8), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob2, 18.0); - Simulator::Schedule(Seconds(8.0), + Simulator::Schedule(Seconds(8), &WaypointInitialPositionIsWaypoint::TestNumWaypoints, this, m_mob2, @@ -292,13 +292,13 @@ WaypointInitialPositionIsWaypoint::DoRun() m_mob3->SetAttributeFailSafe("InitialPositionIsWaypoint", BooleanValue(true)); m_mob3->SetPosition(Vector(10.0, 10.0, 10.0)); // At time 1s, there should be zero waypoints not counting the next one - Simulator::Schedule(Seconds(1.0), + Simulator::Schedule(Seconds(1), &WaypointInitialPositionIsWaypoint::TestNumWaypoints, this, m_mob3, 0); // At time 15s, the model should still be at x position 10.0 - Simulator::Schedule(Seconds(15.0), + Simulator::Schedule(Seconds(15), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob3, @@ -308,33 +308,33 @@ WaypointInitialPositionIsWaypoint::DoRun() // after adding a waypoint. m_mob4 = CreateObject(); m_mob4->SetAttributeFailSafe("InitialPositionIsWaypoint", BooleanValue(true)); - Waypoint wpt41(Seconds(5.0), Vector(15.0, 15.0, 15.0)); + Waypoint wpt41(Seconds(5), Vector(15.0, 15.0, 15.0)); m_mob4->AddWaypoint(wpt41); - Waypoint wpt42(Seconds(10.0), Vector(20.0, 20.0, 20.0)); + Waypoint wpt42(Seconds(10), Vector(20.0, 20.0, 20.0)); m_mob4->AddWaypoint(wpt42); // Here, SetPosition() is called after waypoints have been added. In // this case, the initial position is set until the time of the first // waypoint, at which time it jumps to the waypoint and begins moving m_mob4->SetPosition(Vector(10.0, 10.0, 10.0)); // At time 3, position should be fixed still at 10 - Simulator::Schedule(Seconds(3.0), + Simulator::Schedule(Seconds(3), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob4, 10.0); - Simulator::Schedule(Seconds(3.0), + Simulator::Schedule(Seconds(3), &WaypointInitialPositionIsWaypoint::TestNumWaypoints, this, m_mob4, 1); // At time 6, we should be moving between 15 and 20 - Simulator::Schedule(Seconds(6.0), + Simulator::Schedule(Seconds(6), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob4, 16.0); // At time 15, we should be fixed at 20 - Simulator::Schedule(Seconds(15.0), + Simulator::Schedule(Seconds(15), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob4, @@ -347,16 +347,16 @@ WaypointInitialPositionIsWaypoint::DoRun() // Note: The below statement would result in a crash, because it would // violate the rule that waypoints must increase in start time // m_mob5->SetPosition (Vector (10.0, 10.0, 10.0)); - Waypoint wpt51(Seconds(0.0), Vector(200.0, 200.0, 200.0)); + Waypoint wpt51(Seconds(0), Vector(200.0, 200.0, 200.0)); m_mob5->AddWaypoint(wpt51); - Waypoint wpt52(Seconds(5.0), Vector(15.0, 15.0, 15.0)); + Waypoint wpt52(Seconds(5), Vector(15.0, 15.0, 15.0)); m_mob5->AddWaypoint(wpt52); - Waypoint wpt53(Seconds(10.0), Vector(20.0, 20.0, 20.0)); + Waypoint wpt53(Seconds(10), Vector(20.0, 20.0, 20.0)); m_mob5->AddWaypoint(wpt53); // Here, since waypoints already exist, the below SetPosition will cancel // out wpt51 above, and model will stay at initial position until time 5 m_mob5->SetPosition(Vector(10.0, 10.0, 10.0)); - Simulator::Schedule(Seconds(3.0), + Simulator::Schedule(Seconds(3), &WaypointInitialPositionIsWaypoint::TestXPosition, this, m_mob5, @@ -425,8 +425,8 @@ WaypointMobilityModelViaHelper::DoRun() // Get back a pointer to this Ptr mob = c.Get(0)->GetObject(); // Waypoint added at time 0 will override initial position - Waypoint wpt(Seconds(5.0), Vector(20.0, 20.0, 20.0)); - Waypoint wpt2(Seconds(10.0), Vector(10.0, 10.0, 10.0)); + Waypoint wpt(Seconds(5), Vector(20.0, 20.0, 20.0)); + Waypoint wpt2(Seconds(10), Vector(10.0, 10.0, 10.0)); mob->AddWaypoint(wpt); mob->AddWaypoint(wpt2); // At time 3 (before first waypoint, position is 20 @@ -452,7 +452,7 @@ WaypointMobilityModelViaHelper::DoRun() BooleanValue(true)); mobility2.Install(c2); Ptr mob2 = c2.Get(0)->GetObject(); - Waypoint wpt3(Seconds(5.0), Vector(20.0, 20.0, 20.0)); + Waypoint wpt3(Seconds(5), Vector(20.0, 20.0, 20.0)); mob2->AddWaypoint(wpt3); // Move to position 12 at 3 seconds Simulator::Schedule(Seconds(3), &WaypointMobilityModelViaHelper::TestXPosition, this, mob2, 12); diff --git a/src/mobility/test/mobility-trace-test-suite.cc b/src/mobility/test/mobility-trace-test-suite.cc index f2bdba8e2..11e3333aa 100644 --- a/src/mobility/test/mobility-trace-test-suite.cc +++ b/src/mobility/test/mobility-trace-test-suite.cc @@ -89,7 +89,7 @@ MobilityTraceTestCase::DoRun() AsciiTraceHelper ascii; MobilityHelper::EnableAsciiAll(ascii.CreateFileStream(testMobilityFilePath)); - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc b/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc index d41231f5f..2c8eeb8f7 100644 --- a/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc +++ b/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc @@ -78,7 +78,7 @@ SteadyStateRandomWaypointTest::DoRun() model->AssignStreams(100 * (i + 1)); // Add this mobility model to the stack. mobilityStack.push_back(model); - Simulator::Schedule(Seconds(0.0), &Object::Initialize, model); + Simulator::Schedule(Seconds(0), &Object::Initialize, model); } Simulator::Schedule(Seconds(0.001), &SteadyStateRandomWaypointTest::DistribCompare, this); diff --git a/src/mobility/test/waypoint-mobility-model-test.cc b/src/mobility/test/waypoint-mobility-model-test.cc index 9e9152b1a..ccaa39978 100644 --- a/src/mobility/test/waypoint-mobility-model-test.cc +++ b/src/mobility/test/waypoint-mobility-model-test.cc @@ -81,15 +81,15 @@ WaypointMobilityModelNotifyTest::DoRun() // Add this mobility model to the stack. mobilityStack.push_back(model); - Simulator::Schedule(Seconds(0.0), &Object::Initialize, model); + Simulator::Schedule(Seconds(0), &Object::Initialize, model); } - Waypoint wpt(Seconds(0.0), Vector(0.0, 0.0, 0.0)); + Waypoint wpt(Seconds(0), Vector(0.0, 0.0, 0.0)); // Create waypoints for (uint32_t iw = 0; iw < waypointCount; ++iw) { - wpt.time += Seconds(1.0); + wpt.time += Seconds(1); waypoints.push_back(wpt); } @@ -211,7 +211,7 @@ WaypointMobilityModelAddWaypointTest::DoRun() MakeCallback(&WaypointMobilityModelAddWaypointTest::CourseChangeCallback, this)); // Add this mobility model to the stack. - Simulator::Schedule(Seconds(0.0), &Object::Initialize, m_mobilityModel); + Simulator::Schedule(Seconds(0), &Object::Initialize, m_mobilityModel); Ptr mob = DynamicCast(m_mobilityModel); Waypoint m_nextWaypoint(Seconds(m_waypointCounter), Vector(0.0, 0.0, 0.0)); diff --git a/src/mpi/examples/nms-p2p-nix-distributed.cc b/src/mpi/examples/nms-p2p-nix-distributed.cc index fe18de383..9663503e3 100644 --- a/src/mpi/examples/nms-p2p-nix-distributed.cc +++ b/src/mpi/examples/nms-p2p-nix-distributed.cc @@ -432,7 +432,7 @@ main(int argc, char* argv[]) PacketSinkHelper sinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), 9999)); ApplicationContainer sinkApp = sinkHelper.Install(nodes_net1[0][2].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); if (testing) { sinkApp.Get(0)->TraceConnectWithoutContext("RxWithAddresses", @@ -453,7 +453,7 @@ main(int argc, char* argv[]) PacketSinkHelper sinkHelper("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), 9999)); ApplicationContainer sinkApp = sinkHelper.Install(nodes_net1[1][0].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); if (testing) { sinkApp.Get(0)->TraceConnectWithoutContext("RxWithAddresses", @@ -500,7 +500,7 @@ main(int argc, char* argv[]) ApplicationContainer sinkApp = sinkHelper.Install(nodes_net2LAN[z][i][j].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); if (testing) { sinkApp.Get(0)->TraceConnectWithoutContext( @@ -516,7 +516,7 @@ main(int argc, char* argv[]) ApplicationContainer sinkApp = sinkHelper.Install(nodes_net2LAN[z][i][j].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); if (testing) { sinkApp.Get(0)->TraceConnectWithoutContext( @@ -569,7 +569,7 @@ main(int argc, char* argv[]) ApplicationContainer sinkApp = sinkHelper.Install(nodes_net3LAN[z][i][j].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); if (testing) { sinkApp.Get(0)->TraceConnectWithoutContext( @@ -585,7 +585,7 @@ main(int argc, char* argv[]) ApplicationContainer sinkApp = sinkHelper.Install(nodes_net3LAN[z][i][j].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); if (testing) { sinkApp.Get(0)->TraceConnectWithoutContext( diff --git a/src/mpi/examples/simple-distributed-empty-node.cc b/src/mpi/examples/simple-distributed-empty-node.cc index 11092f625..f5e099bd3 100644 --- a/src/mpi/examples/simple-distributed-empty-node.cc +++ b/src/mpi/examples/simple-distributed-empty-node.cc @@ -273,7 +273,7 @@ main(int argc, char* argv[]) MakeCallback(&SinkTracer::SinkTrace)); } } - sinkApp.Start(Seconds(1.0)); + sinkApp.Start(Seconds(1)); sinkApp.Stop(Seconds(5)); } @@ -292,7 +292,7 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(leftLeafNodes.Get(i))); } - clientApps.Start(Seconds(1.0)); + clientApps.Start(Seconds(1)); clientApps.Stop(Seconds(5)); } diff --git a/src/mpi/examples/simple-distributed-mpi-comm.cc b/src/mpi/examples/simple-distributed-mpi-comm.cc index f4a51ebce..efd75a5bd 100644 --- a/src/mpi/examples/simple-distributed-mpi-comm.cc +++ b/src/mpi/examples/simple-distributed-mpi-comm.cc @@ -459,7 +459,7 @@ main(int argc, char* argv[]) } sinkApp.Add(apps); } - sinkApp.Start(Seconds(1.0)); + sinkApp.Start(Seconds(1)); sinkApp.Stop(Seconds(5)); } @@ -478,7 +478,7 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(leftLeafNodes.Get(i))); } - clientApps.Start(Seconds(1.0)); + clientApps.Start(Seconds(1)); clientApps.Stop(Seconds(5)); } diff --git a/src/mpi/examples/simple-distributed.cc b/src/mpi/examples/simple-distributed.cc index d32d5e15c..2a99e8bd1 100644 --- a/src/mpi/examples/simple-distributed.cc +++ b/src/mpi/examples/simple-distributed.cc @@ -247,7 +247,7 @@ main(int argc, char* argv[]) MakeCallback(&SinkTracer::SinkTrace)); } } - sinkApp.Start(Seconds(1.0)); + sinkApp.Start(Seconds(1)); sinkApp.Stop(Seconds(5)); } @@ -266,7 +266,7 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(leftLeafNodes.Get(i))); } - clientApps.Start(Seconds(1.0)); + clientApps.Start(Seconds(1)); clientApps.Stop(Seconds(5)); } diff --git a/src/mpi/examples/third-distributed.cc b/src/mpi/examples/third-distributed.cc index be5f842f8..cce78c678 100644 --- a/src/mpi/examples/third-distributed.cc +++ b/src/mpi/examples/third-distributed.cc @@ -218,8 +218,8 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(nCsma)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); if (testing) { @@ -235,12 +235,12 @@ main(int argc, char* argv[]) { UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(nCsma), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(wifiStaNodes.Get(nWifi - 1)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); if (testing) { @@ -251,7 +251,7 @@ main(int argc, char* argv[]) Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); if (tracing) { diff --git a/src/netanim/examples/colors-link-description.cc b/src/netanim/examples/colors-link-description.cc index 78f28f0ce..f451f8a05 100644 --- a/src/netanim/examples/colors-link-description.cc +++ b/src/netanim/examples/colors-link-description.cc @@ -136,8 +136,8 @@ main(int argc, char* argv[]) clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(0.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(0)); + clientApps.Stop(Seconds(10)); // Set the bounding box for animation diff --git a/src/netanim/examples/dumbbell-animation.cc b/src/netanim/examples/dumbbell-animation.cc index 18e1aa6eb..9ff40498b 100644 --- a/src/netanim/examples/dumbbell-animation.cc +++ b/src/netanim/examples/dumbbell-animation.cc @@ -78,8 +78,8 @@ main(int argc, char* argv[]) clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(0.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(0)); + clientApps.Stop(Seconds(10)); // Set the bounding box for animation d.BoundingBox(1, 1, 100, 100); diff --git a/src/netanim/examples/grid-animation.cc b/src/netanim/examples/grid-animation.cc index 7ead0b2e4..cf7423bd1 100644 --- a/src/netanim/examples/grid-animation.cc +++ b/src/netanim/examples/grid-animation.cc @@ -62,7 +62,7 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(grid.GetNode(0, 0))); - clientApps.Start(Seconds(0.0)); + clientApps.Start(Seconds(0)); clientApps.Stop(Seconds(1.5)); // Set the bounding box for animation diff --git a/src/netanim/examples/resources-counters.cc b/src/netanim/examples/resources-counters.cc index 36e7fd443..3df6ecebd 100644 --- a/src/netanim/examples/resources-counters.cc +++ b/src/netanim/examples/resources-counters.cc @@ -169,8 +169,8 @@ main(int argc, char* argv[]) clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(0.0)); - clientApps.Stop(Seconds(5.0)); + clientApps.Start(Seconds(0)); + clientApps.Stop(Seconds(5)); // Set the bounding box for animation diff --git a/src/netanim/examples/star-animation.cc b/src/netanim/examples/star-animation.cc index d88a76c46..60ca160a1 100644 --- a/src/netanim/examples/star-animation.cc +++ b/src/netanim/examples/star-animation.cc @@ -89,8 +89,8 @@ main(int argc, char* argv[]) } PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", hubLocalAddress); ApplicationContainer hubApp = packetSinkHelper.Install(star.GetHub()); - hubApp.Start(Seconds(1.0)); - hubApp.Stop(Seconds(10.0)); + hubApp.Start(Seconds(1)); + hubApp.Stop(Seconds(10)); // // Create OnOff applications to send TCP to the hub, one on each spoke node. @@ -115,8 +115,8 @@ main(int argc, char* argv[]) onOffHelper.SetAttribute("Remote", remoteAddress); spokeApps.Add(onOffHelper.Install(star.GetSpokeNode(i))); } - spokeApps.Start(Seconds(1.0)); - spokeApps.Stop(Seconds(10.0)); + spokeApps.Start(Seconds(1)); + spokeApps.Stop(Seconds(10)); NS_LOG_INFO("Enable static global routing."); // diff --git a/src/netanim/examples/wireless-animation.cc b/src/netanim/examples/wireless-animation.cc index e3df9a919..0dc7d9e41 100644 --- a/src/netanim/examples/wireless-animation.cc +++ b/src/netanim/examples/wireless-animation.cc @@ -139,18 +139,18 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(csmaNodes.Get(1)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(15.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(15)); UdpEchoClientHelper echoClient(csmaInterfaces.GetAddress(1), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(10)); echoClient.SetAttribute("Interval", TimeValue(Seconds(1.))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(wifiStaNodes); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(15.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(15)); Ipv4GlobalRoutingHelper::PopulateRoutingTables(); - Simulator::Stop(Seconds(15.0)); + Simulator::Stop(Seconds(15)); AnimationInterface anim("wireless-animation.xml"); // Mandatory for (uint32_t i = 0; i < wifiStaNodes.GetN(); ++i) diff --git a/src/netanim/test/netanim-test.cc b/src/netanim/test/netanim-test.cc index da0c58443..9f06bf2d8 100644 --- a/src/netanim/test/netanim-test.cc +++ b/src/netanim/test/netanim-test.cc @@ -149,17 +149,17 @@ AnimationInterfaceTestCase::PrepareNetwork() UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(m_nodes.Get(1)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); UdpEchoClientHelper echoClient(interfaces.GetAddress(1), 9); echoClient.SetAttribute("MaxPackets", UintegerValue(100)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(m_nodes.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); } void diff --git a/src/network/model/application.cc b/src/network/model/application.cc index c4dc3c578..ea93c7609 100644 --- a/src/network/model/application.cc +++ b/src/network/model/application.cc @@ -34,7 +34,7 @@ Application::GetTypeId() .SetGroupName("Network") .AddAttribute("StartTime", "Time at which the application will start", - TimeValue(Seconds(0.0)), + TimeValue(Seconds(0)), MakeTimeAccessor(&Application::m_startTime), MakeTimeChecker()) .AddAttribute("StopTime", diff --git a/src/network/model/node.cc b/src/network/model/node.cc index 999edc5b8..053df1744 100644 --- a/src/network/model/node.cc +++ b/src/network/model/node.cc @@ -129,7 +129,7 @@ Node::AddDevice(Ptr device) device->SetNode(this); device->SetIfIndex(index); device->SetReceiveCallback(MakeCallback(&Node::NonPromiscReceiveFromDevice, this)); - Simulator::ScheduleWithContext(GetId(), Seconds(0.0), &NetDevice::Initialize, device); + Simulator::ScheduleWithContext(GetId(), Seconds(0), &NetDevice::Initialize, device); NotifyDeviceAdded(device); return index; } @@ -156,7 +156,7 @@ Node::AddApplication(Ptr application) uint32_t index = m_applications.size(); m_applications.push_back(application); application->SetNode(this); - Simulator::ScheduleWithContext(GetId(), Seconds(0.0), &Application::Initialize, application); + Simulator::ScheduleWithContext(GetId(), Seconds(0), &Application::Initialize, application); return index; } diff --git a/src/network/utils/packet-socket-client.cc b/src/network/utils/packet-socket-client.cc index 6162f22b4..f6484a138 100644 --- a/src/network/utils/packet-socket-client.cc +++ b/src/network/utils/packet-socket-client.cc @@ -47,7 +47,7 @@ PacketSocketClient::GetTypeId() MakeUintegerChecker()) .AddAttribute("Interval", "The time to wait between packets", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&PacketSocketClient::m_interval), MakeTimeChecker()) .AddAttribute("PacketSize", diff --git a/src/nix-vector-routing/examples/nix-double-wifi.cc b/src/nix-vector-routing/examples/nix-double-wifi.cc index d3cace388..2ca4976b4 100644 --- a/src/nix-vector-routing/examples/nix-double-wifi.cc +++ b/src/nix-vector-routing/examples/nix-double-wifi.cc @@ -238,19 +238,19 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(wifiStaNodes2.Get(2)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); UdpEchoClientHelper echoClient(udpServerAddress, 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); - echoClient.SetAttribute("Interval", TimeValue(Seconds(1.0))); + echoClient.SetAttribute("Interval", TimeValue(Seconds(1))); echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(wifiStaNodes1.Get(2)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/nix-vector-routing/examples/nix-simple-multi-address.cc b/src/nix-vector-routing/examples/nix-simple-multi-address.cc index baab74a1a..87d617e46 100644 --- a/src/nix-vector-routing/examples/nix-simple-multi-address.cc +++ b/src/nix-vector-routing/examples/nix-simple-multi-address.cc @@ -181,8 +181,8 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(nodes34.Get(1)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); // Set the destination address as 10.1.3.2 UdpEchoClientHelper echoClient(interfaces34.GetAddress(1), 9); @@ -191,8 +191,8 @@ main(int argc, char* argv[]) echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(nodes12.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); // Trace routing paths for different source and destinations. Ptr routingStream = diff --git a/src/nix-vector-routing/examples/nix-simple.cc b/src/nix-vector-routing/examples/nix-simple.cc index 9b81d9db3..2aec93aaf 100644 --- a/src/nix-vector-routing/examples/nix-simple.cc +++ b/src/nix-vector-routing/examples/nix-simple.cc @@ -297,8 +297,8 @@ main(int argc, char* argv[]) UdpEchoServerHelper echoServer(9); ApplicationContainer serverApps = echoServer.Install(nodes.Get(3)); - serverApps.Start(Seconds(1.0)); - serverApps.Stop(Seconds(10.0)); + serverApps.Start(Seconds(1)); + serverApps.Stop(Seconds(10)); UdpEchoClientHelper echoClient(udpServerAddress, 9); echoClient.SetAttribute("MaxPackets", UintegerValue(1)); @@ -306,8 +306,8 @@ main(int argc, char* argv[]) echoClient.SetAttribute("PacketSize", UintegerValue(1024)); ApplicationContainer clientApps = echoClient.Install(nodes.Get(0)); - clientApps.Start(Seconds(2.0)); - clientApps.Stop(Seconds(10.0)); + clientApps.Start(Seconds(2)); + clientApps.Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/nix-vector-routing/examples/nms-p2p-nix.cc b/src/nix-vector-routing/examples/nms-p2p-nix.cc index 60ab01a16..0878f8c0a 100644 --- a/src/nix-vector-routing/examples/nms-p2p-nix.cc +++ b/src/nix-vector-routing/examples/nms-p2p-nix.cc @@ -657,7 +657,7 @@ main(int argc, char* argv[]) // Sinks PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", sinkAddress); ApplicationContainer sinkApp = sinkHelper.Install(nodes_net2LAN[z][i][j].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); // Sources r1 = 2 + (int)(4 * urng->GetValue()); r2 = 10 * urng->GetValue(); @@ -678,7 +678,7 @@ main(int argc, char* argv[]) // Sinks PacketSinkHelper sinkHelper("ns3::TcpSocketFactory", sinkAddress); ApplicationContainer sinkApp = sinkHelper.Install(nodes_net3LAN[z][i][j].Get(0)); - sinkApp.Start(Seconds(0.0)); + sinkApp.Start(Seconds(0)); // Sources r1 = 2 + (int)(4 * urng->GetValue()); r2 = 10 * urng->GetValue(); @@ -716,7 +716,7 @@ main(int argc, char* argv[]) Simulator::ScheduleNow(Progress); std::cout << "Running simulator..." << std::endl; auto t1 = std::chrono::steady_clock::now(); - Simulator::Stop(Seconds(100.0)); + Simulator::Stop(Seconds(100)); Simulator::Run(); auto t2 = std::chrono::steady_clock::now(); std::cout << "Simulator finished." << std::endl; diff --git a/src/olsr/examples/olsr-hna.cc b/src/olsr/examples/olsr-hna.cc index 3f9b9b2ea..9edba0ee8 100644 --- a/src/olsr/examples/olsr-hna.cc +++ b/src/olsr/examples/olsr-hna.cc @@ -273,7 +273,7 @@ main(int argc, char* argv[]) csma.EnableAsciiAll(ascii.CreateFileStream("olsr-hna-csma.tr")); Simulator::ScheduleWithContext(source->GetNode()->GetId(), - Seconds(15.0), + Seconds(15), &GenerateTraffic, source, packetSize, @@ -284,7 +284,7 @@ main(int argc, char* argv[]) Create("olsr-hna.routes", std::ios::out); Ipv4RoutingHelper::PrintRoutingTableAllAt(Seconds(15), routingStream); - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/olsr/examples/simple-point-to-point-olsr.cc b/src/olsr/examples/simple-point-to-point-olsr.cc index 51c2a2fdb..3fa0a88dd 100644 --- a/src/olsr/examples/simple-point-to-point-olsr.cc +++ b/src/olsr/examples/simple-point-to-point-olsr.cc @@ -122,8 +122,8 @@ main(int argc, char* argv[]) onoff1.SetConstantRate(DataRate("448kb/s")); ApplicationContainer onOffApp1 = onoff1.Install(c.Get(0)); - onOffApp1.Start(Seconds(10.0)); - onOffApp1.Stop(Seconds(20.0)); + onOffApp1.Start(Seconds(10)); + onOffApp1.Stop(Seconds(20)); // Create a similar flow from n3 to n1, starting at time 1.1 seconds OnOffHelper onoff2("ns3::UdpSocketFactory", InetSocketAddress(i12.GetAddress(0), port)); @@ -131,14 +131,14 @@ main(int argc, char* argv[]) ApplicationContainer onOffApp2 = onoff2.Install(c.Get(3)); onOffApp2.Start(Seconds(10.1)); - onOffApp2.Stop(Seconds(20.0)); + onOffApp2.Stop(Seconds(20)); // Create packet sinks to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); NodeContainer sinks = NodeContainer(c.Get(4), c.Get(1)); ApplicationContainer sinkApps = sink.Install(sinks); - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(21.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(21)); AsciiTraceHelper ascii; p2p.EnableAsciiAll(ascii.CreateFileStream("simple-point-to-point-olsr.tr")); diff --git a/src/olsr/test/bug780-test.cc b/src/olsr/test/bug780-test.cc index c7e6ca240..42872b126 100644 --- a/src/olsr/test/bug780-test.cc +++ b/src/olsr/test/bug780-test.cc @@ -34,7 +34,7 @@ namespace olsr Bug780Test::Bug780Test() : TestCase("Test OLSR bug 780"), - m_time(Seconds(200.0)), + m_time(Seconds(200)), m_seq(0), m_recvCount(0) { @@ -89,8 +89,8 @@ Bug780Test::CreateNodes() Ptr nd2 = DynamicCast(nd.Get(2)); Ptr ch = DynamicCast(nd.Get(0)->GetChannel()); - Simulator::Schedule(Seconds(100.0), &SimpleChannel::BlackList, ch, nd0, nd2); - Simulator::Schedule(Seconds(100.0), &SimpleChannel::BlackList, ch, nd2, nd0); + Simulator::Schedule(Seconds(100), &SimpleChannel::BlackList, ch, nd0, nd2); + Simulator::Schedule(Seconds(100), &SimpleChannel::BlackList, ch, nd2, nd0); // 3. Setup ping m_socket = Socket::CreateSocket(c.Get(0), TypeId::LookupByName("ns3::Ipv4RawSocketFactory")); diff --git a/src/openflow/examples/openflow-switch.cc b/src/openflow/examples/openflow-switch.cc index 753a85b0d..f157d045a 100644 --- a/src/openflow/examples/openflow-switch.cc +++ b/src/openflow/examples/openflow-switch.cc @@ -166,14 +166,14 @@ main(int argc, char* argv[]) ApplicationContainer app = onoff.Install(terminals.Get(0)); // Start the application - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); app = sink.Install(terminals.Get(1)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); // // Create a similar flow from n3 to n0, starting at time 1.1 seconds @@ -181,10 +181,10 @@ main(int argc, char* argv[]) onoff.SetAttribute("Remote", AddressValue(InetSocketAddress(Ipv4Address("10.1.1.1"), port))); app = onoff.Install(terminals.Get(3)); app.Start(Seconds(1.1)); - app.Stop(Seconds(10.0)); + app.Stop(Seconds(10)); app = sink.Install(terminals.Get(0)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); NS_LOG_INFO("Configure Tracing."); diff --git a/src/openflow/examples/openflow-switch.py b/src/openflow/examples/openflow-switch.py index 5c09ebf44..4ae51849b 100644 --- a/src/openflow/examples/openflow-switch.py +++ b/src/openflow/examples/openflow-switch.py @@ -63,24 +63,24 @@ onoff.SetConstantRate(ns.DataRate("500kb/s")) app = onoff.Install(terminals.Get(0)) -app.Start(ns.Seconds(1.0)) -app.Stop(ns.Seconds(10.0)) +app.Start(ns.Seconds(1)) +app.Stop(ns.Seconds(10)) sink = ns.PacketSinkHelper( "ns3::UdpSocketFactory", ns.InetSocketAddress(ns.Ipv4Address.GetAny(), port).ConvertTo() ) app = sink.Install(terminals.Get(1)) -app.Start(ns.Seconds(0.0)) +app.Start(ns.Seconds(0)) onoff.SetAttribute( "Remote", ns.AddressValue(ns.InetSocketAddress(ns.Ipv4Address("10.1.1.1"), port).ConvertTo()) ) app = onoff.Install(terminals.Get(3)) app.Start(ns.Seconds(1.1)) -app.Stop(ns.Seconds(10.0)) +app.Stop(ns.Seconds(10)) app = sink.Install(terminals.Get(0)) -app.Start(ns.Seconds(0.0)) +app.Start(ns.Seconds(0)) ns.Simulator.Run() ns.Simulator.Destroy() diff --git a/src/point-to-point/model/point-to-point-net-device.cc b/src/point-to-point/model/point-to-point-net-device.cc index 2fbedd3f1..91c6c5ac0 100644 --- a/src/point-to-point/model/point-to-point-net-device.cc +++ b/src/point-to-point/model/point-to-point-net-device.cc @@ -57,7 +57,7 @@ PointToPointNetDevice::GetTypeId() MakePointerChecker()) .AddAttribute("InterframeGap", "The time to wait between packet (frame) transmissions", - TimeValue(Seconds(0.0)), + TimeValue(Seconds(0)), MakeTimeAccessor(&PointToPointNetDevice::m_tInterframeGap), MakeTimeChecker()) diff --git a/src/point-to-point/test/point-to-point-test.cc b/src/point-to-point/test/point-to-point-test.cc index ac4a42945..16e834f7f 100644 --- a/src/point-to-point/test/point-to-point-test.cc +++ b/src/point-to-point/test/point-to-point-test.cc @@ -108,7 +108,7 @@ PointToPointTest::DoRun() "for her merchandise, he traded in his prize."; size_t txBufferSize = sizeof(txBuffer); - Simulator::Schedule(Seconds(1.0), + Simulator::Schedule(Seconds(1), &PointToPointTest::SendOnePacket, this, devA, diff --git a/src/propagation/examples/main-propagation-loss.cc b/src/propagation/examples/main-propagation-loss.cc index 11e5023fc..d8c70e7a1 100644 --- a/src/propagation/examples/main-propagation-loss.cc +++ b/src/propagation/examples/main-propagation-loss.cc @@ -84,7 +84,7 @@ TestDeterministic(Ptr model, double targetDistance, double dataset.Add(distance, rxPowerDbm); - Simulator::Stop(Seconds(1.0)); + Simulator::Stop(Seconds(1)); Simulator::Run(); } } @@ -250,7 +250,7 @@ main(int argc, char* argv[]) double testDeterministicDistance = 2500.0; double testProbabilisticDistance = 2500.0; unsigned int testProbabilisticSamples = 100000; - Time testJakesTimeOneMsRes = Seconds(1.0); + Time testJakesTimeOneMsRes = Seconds(1); Time testJakesTimeZeroDotOneMsRes = Seconds(0.1); if (test) diff --git a/src/propagation/model/channel-condition-model.cc b/src/propagation/model/channel-condition-model.cc index 87ec64065..fa6f1f454 100644 --- a/src/propagation/model/channel-condition-model.cc +++ b/src/propagation/model/channel-condition-model.cc @@ -388,7 +388,7 @@ void ThreeGppChannelConditionModel::DoDispose() { m_channelConditionMap.clear(); - m_updatePeriod = Seconds(0.0); + m_updatePeriod = Seconds(0); } Ptr diff --git a/src/sixlowpan/examples/example-ping-lr-wpan-beacon.cc b/src/sixlowpan/examples/example-ping-lr-wpan-beacon.cc index 437dbe35d..e627233df 100644 --- a/src/sixlowpan/examples/example-ping-lr-wpan-beacon.cc +++ b/src/sixlowpan/examples/example-ping-lr-wpan-beacon.cc @@ -143,8 +143,8 @@ main(int argc, char** argv) ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(nodes.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(7.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(7)); AsciiTraceHelper ascii; lrWpanHelper.EnableAsciiAll(ascii.CreateFileStream("Ping-6LoW-lr-wpan-beacon.tr")); diff --git a/src/sixlowpan/examples/example-ping-lr-wpan-mesh-under.cc b/src/sixlowpan/examples/example-ping-lr-wpan-mesh-under.cc index e08a400c3..75094eccb 100644 --- a/src/sixlowpan/examples/example-ping-lr-wpan-mesh-under.cc +++ b/src/sixlowpan/examples/example-ping-lr-wpan-mesh-under.cc @@ -116,8 +116,8 @@ main(int argc, char** argv) ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(wsnNodes.Get(nWsnNodes - 1)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(20)); AsciiTraceHelper ascii; lrWpanHelper.EnableAsciiAll(ascii.CreateFileStream("Ping-6LoW-lr-wpan-meshunder-lr-wpan.tr")); diff --git a/src/sixlowpan/examples/example-ping-lr-wpan.cc b/src/sixlowpan/examples/example-ping-lr-wpan.cc index 9099c93cf..e2585b688 100644 --- a/src/sixlowpan/examples/example-ping-lr-wpan.cc +++ b/src/sixlowpan/examples/example-ping-lr-wpan.cc @@ -107,8 +107,8 @@ main(int argc, char** argv) ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(nodes.Get(0)); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(20)); if (!disableAsciiTrace) { diff --git a/src/sixlowpan/examples/example-sixlowpan.cc b/src/sixlowpan/examples/example-sixlowpan.cc index 2fe71f523..03a440089 100644 --- a/src/sixlowpan/examples/example-sixlowpan.cc +++ b/src/sixlowpan/examples/example-sixlowpan.cc @@ -102,8 +102,8 @@ main(int argc, char** argv) ping.SetAttribute("Size", UintegerValue(packetSize)); ApplicationContainer apps = ping.Install(net1.Get(0)); - apps.Start(Seconds(5.0)); - apps.Stop(Seconds(15.0)); + apps.Start(Seconds(5)); + apps.Stop(Seconds(15)); AsciiTraceHelper ascii; csma.EnableAsciiAll(ascii.CreateFileStream("example-sixlowpan.tr")); diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc index 4ecc2e276..6c6a75ce0 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc @@ -179,7 +179,7 @@ main(int argc, char** argv) onoff.SetAttribute("PacketSize", UintegerValue(pktSize)); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(0.0)); + apps.Start(Seconds(0)); apps.Stop(Seconds(simDuration)); Config::Connect("/NodeList/*/DeviceList/*/Phy/RxEndOk", MakeCallback(&PhyRxEndOkTrace)); diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc index 315258c7b..7ec3e0ed2 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc @@ -220,7 +220,7 @@ main(int argc, char** argv) onoff.SetAttribute("PacketSize", UintegerValue(1500)); ApplicationContainer apps = onoff.Install(ofdmNodes.Get(0)); - apps.Start(Seconds(0.0)); + apps.Start(Seconds(0)); apps.Stop(Seconds(1)); Ptr recvSink = SetupPacketReceive(ofdmNodes.Get(1)); diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc index 10c325bd1..7c78ec19f 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc @@ -203,7 +203,7 @@ main(int argc, char** argv) Ptr recvSink = SetupPacketReceive(c.Get(1)); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Config::Connect("/NodeList/*/DeviceList/*/Phy/TxStart", MakeCallback(&PhyTxStartTrace)); Config::Connect("/NodeList/*/DeviceList/*/Phy/TxEnd", MakeCallback(&PhyTxEndTrace)); diff --git a/src/spectrum/examples/three-gpp-channel-example.cc b/src/spectrum/examples/three-gpp-channel-example.cc index 574f3ba69..651f4683b 100644 --- a/src/spectrum/examples/three-gpp-channel-example.cc +++ b/src/spectrum/examples/three-gpp-channel-example.cc @@ -174,7 +174,7 @@ main(int argc, char* argv[]) Config::SetDefault("ns3::ThreeGppChannelModel::UpdatePeriod", TimeValue(MilliSeconds(1))); // update the channel at each iteration Config::SetDefault("ns3::ThreeGppChannelConditionModel::UpdatePeriod", - TimeValue(MilliSeconds(0.0))); // do not update the channel condition + TimeValue(MilliSeconds(0))); // do not update the channel condition RngSeedManager::SetSeed(1); RngSeedManager::SetRun(1); diff --git a/src/spectrum/examples/three-gpp-ntn-channel-example.cc b/src/spectrum/examples/three-gpp-ntn-channel-example.cc index a4fa60120..2c9f8a529 100644 --- a/src/spectrum/examples/three-gpp-ntn-channel-example.cc +++ b/src/spectrum/examples/three-gpp-ntn-channel-example.cc @@ -345,7 +345,7 @@ main(int argc, char* argv[]) Config::SetDefault("ns3::ThreeGppChannelModel::UpdatePeriod", TimeValue(MilliSeconds(10))); // update the channel at every 10 ms Config::SetDefault("ns3::ThreeGppChannelConditionModel::UpdatePeriod", - TimeValue(MilliSeconds(0.0))); // do not update the channel condition + TimeValue(MilliSeconds(0))); // do not update the channel condition RngSeedManager::SetSeed(1); RngSeedManager::SetRun(1); diff --git a/src/spectrum/model/trace-fading-loss-model.cc b/src/spectrum/model/trace-fading-loss-model.cc index c21d3f11c..8036e276d 100644 --- a/src/spectrum/model/trace-fading-loss-model.cc +++ b/src/spectrum/model/trace-fading-loss-model.cc @@ -57,7 +57,7 @@ TraceFadingLossModel::GetTypeId() MakeStringChecker()) .AddAttribute("TraceLength", "The total length of the fading trace (default value 10 s.)", - TimeValue(Seconds(10.0)), + TimeValue(Seconds(10)), MakeTimeAccessor(&TraceFadingLossModel::SetTraceLength), MakeTimeChecker()) .AddAttribute("SamplesNum", diff --git a/src/spectrum/model/waveform-generator.cc b/src/spectrum/model/waveform-generator.cc index 3e5a7c0ce..598632ef1 100644 --- a/src/spectrum/model/waveform-generator.cc +++ b/src/spectrum/model/waveform-generator.cc @@ -59,7 +59,7 @@ WaveformGenerator::GetTypeId() .AddAttribute( "Period", "the period (=1/frequency)", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&WaveformGenerator::SetPeriod, &WaveformGenerator::GetPeriod), MakeTimeChecker()) .AddAttribute("DutyCycle", diff --git a/src/spectrum/test/spectrum-ideal-phy-test.cc b/src/spectrum/test/spectrum-ideal-phy-test.cc index a8b6ad407..98d20665e 100644 --- a/src/spectrum/test/spectrum-ideal-phy-test.cc +++ b/src/spectrum/test/spectrum-ideal-phy-test.cc @@ -187,7 +187,7 @@ SpectrumIdealPhyTestCase::DoRun() TimeValue(Seconds(double(pktSize * 8) / (1.2 * double(phyRate))))); client->SetAttribute("PacketSize", UintegerValue(pktSize)); client->SetAttribute("MaxPackets", UintegerValue(0)); - client->SetStartTime(Seconds(0.0)); + client->SetStartTime(Seconds(0)); client->SetStopTime(Seconds(testDuration)); c.Get(0)->AddApplication(client); diff --git a/src/spectrum/test/spectrum-waveform-generator-test.cc b/src/spectrum/test/spectrum-waveform-generator-test.cc index 67c965d2b..58eacaeb8 100644 --- a/src/spectrum/test/spectrum-waveform-generator-test.cc +++ b/src/spectrum/test/spectrum-waveform-generator-test.cc @@ -93,10 +93,10 @@ WaveformGeneratorTestCase::DoRun() wave->TraceConnectWithoutContext("TxStart", MakeCallback(&WaveformGeneratorTestCase::TraceWave, this)); - Simulator::Schedule(Seconds(1.0), &WaveformGenerator::Start, wave); + Simulator::Schedule(Seconds(1), &WaveformGenerator::Start, wave); Simulator::Schedule(Seconds(m_stop), &WaveformGenerator::Stop, wave); - Simulator::Stop(Seconds(3.0)); + Simulator::Stop(Seconds(3)); Simulator::Run(); NS_TEST_ASSERT_MSG_EQ(m_fails, 0, "Wave started after the stop method was called"); diff --git a/src/stats/doc/probe.rst b/src/stats/doc/probe.rst index b8148e4b6..229ebecbc 100644 --- a/src/stats/doc/probe.rst +++ b/src/stats/doc/probe.rst @@ -93,8 +93,8 @@ method: Ptr myprobe = CreateObjectWithAttributes( "Name", StringValue("myprobe"), "Enabled", BooleanValue(false), - "Start", TimeValue(Seconds(100.0)), - "Stop", TimeValue(Seconds(1000.0))); + "Start", TimeValue(Seconds(100)), + "Stop", TimeValue(Seconds(1000))); Start and Stop are Time variables which determine the interval of action of the Probe. The Probe will only output data if the current time of the @@ -301,7 +301,7 @@ First, the emitter needs to be setup: // The Emitter object is not associated with an ns-3 node, so // it won't get started automatically, so we need to do this ourselves - Simulator::Schedule(Seconds(0.0), &Emitter::Start, emitter); + Simulator::Schedule(Seconds(0), &Emitter::Start, emitter); The various DoubleProbes interact with the emitter in the example as shown below. diff --git a/src/stats/examples/double-probe-example.cc b/src/stats/examples/double-probe-example.cc index 3b9fa97d5..c57be7656 100644 --- a/src/stats/examples/double-probe-example.cc +++ b/src/stats/examples/double-probe-example.cc @@ -201,9 +201,9 @@ main(int argc, char* argv[]) // The Emitter object is not associated with an ns-3 node, so // it won't get started automatically, so we need to do this ourselves - Simulator::Schedule(Seconds(0.0), &Emitter::Initialize, emitter); + Simulator::Schedule(Seconds(0), &Emitter::Initialize, emitter); - Simulator::Stop(Seconds(100.0)); + Simulator::Stop(Seconds(100)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/stats/examples/file-helper-example.cc b/src/stats/examples/file-helper-example.cc index f258b1e42..02ffc8b67 100644 --- a/src/stats/examples/file-helper-example.cc +++ b/src/stats/examples/file-helper-example.cc @@ -118,9 +118,9 @@ main(int argc, char* argv[]) // The Emitter object is not associated with an ns-3 node, so // it won't get started automatically, so we need to do this ourselves - Simulator::Schedule(Seconds(0.0), &Emitter::Initialize, emitter); + Simulator::Schedule(Seconds(0), &Emitter::Initialize, emitter); - Simulator::Stop(Seconds(100.0)); + Simulator::Stop(Seconds(100)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/stats/examples/gnuplot-helper-example.cc b/src/stats/examples/gnuplot-helper-example.cc index 7dd0a7033..0cf63a508 100644 --- a/src/stats/examples/gnuplot-helper-example.cc +++ b/src/stats/examples/gnuplot-helper-example.cc @@ -126,9 +126,9 @@ main(int argc, char* argv[]) // The Emitter object is not associated with an ns-3 node, so // it won't get started automatically, so we need to do this ourselves - Simulator::Schedule(Seconds(0.0), &Emitter::Initialize, emitter); + Simulator::Schedule(Seconds(0), &Emitter::Initialize, emitter); - Simulator::Stop(Seconds(100.0)); + Simulator::Stop(Seconds(100)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/stats/examples/time-probe-example.cc b/src/stats/examples/time-probe-example.cc index e7e5c8b23..3c07d7925 100644 --- a/src/stats/examples/time-probe-example.cc +++ b/src/stats/examples/time-probe-example.cc @@ -234,7 +234,7 @@ main(int argc, char* argv[]) // The Emitter object is not associated with an ns-3 node, so // it won't get started automatically, so we need to do this ourselves - Simulator::Schedule(Seconds(0.0), &Emitter::Initialize, emitter); + Simulator::Schedule(Seconds(0), &Emitter::Initialize, emitter); Simulator::Stop(Seconds(stopTime)); Simulator::Run(); diff --git a/src/stats/test/double-probe-test-suite.cc b/src/stats/test/double-probe-test-suite.cc index c85466658..703efb4b8 100644 --- a/src/stats/test/double-probe-test-suite.cc +++ b/src/stats/test/double-probe-test-suite.cc @@ -163,8 +163,8 @@ ProbeTestCase1::DoRun() p->SetName("testProbe"); Simulator::Schedule(Seconds(1), &SampleEmitter::Start, m_s); - p->SetAttribute("Start", TimeValue(Seconds(100.0))); - p->SetAttribute("Stop", TimeValue(Seconds(200.0))); + p->SetAttribute("Start", TimeValue(Seconds(100))); + p->SetAttribute("Stop", TimeValue(Seconds(200))); Simulator::Stop(Seconds(300)); // Register our emitter object so we can fetch it by using the Config @@ -181,8 +181,8 @@ ProbeTestCase1::DoRun() // name set above Ptr p2 = CreateObject(); p2->SetName("testProbe2"); - p2->SetAttribute("Start", TimeValue(Seconds(100.0))); - p2->SetAttribute("Stop", TimeValue(Seconds(200.0))); + p2->SetAttribute("Start", TimeValue(Seconds(100))); + p2->SetAttribute("Stop", TimeValue(Seconds(200))); // Hook probe to the emitter. p2->ConnectByPath("/Names/SampleEmitter/Emitter"); diff --git a/src/tap-bridge/examples/tap-wifi-dumbbell.cc b/src/tap-bridge/examples/tap-wifi-dumbbell.cc index 567153575..d0292a201 100644 --- a/src/tap-bridge/examples/tap-wifi-dumbbell.cc +++ b/src/tap-bridge/examples/tap-wifi-dumbbell.cc @@ -204,13 +204,13 @@ main(int argc, char* argv[]) onoff.SetConstantRate(DataRate("500kb/s")); ApplicationContainer apps = onoff.Install(nodesLeft.Get(3)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); apps = sink.Install(nodesRight.Get(0)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); wifiPhy.EnablePcapAll("tap-wifi-dumbbell"); diff --git a/src/tap-bridge/model/tap-bridge.cc b/src/tap-bridge/model/tap-bridge.cc index 8436f26a5..7f1785244 100644 --- a/src/tap-bridge/model/tap-bridge.cc +++ b/src/tap-bridge/model/tap-bridge.cc @@ -720,7 +720,7 @@ TapBridge::ReadCallback(uint8_t* buf, ssize_t len) NS_LOG_INFO("TapBridge::ReadCallback(): Received packet on node " << m_nodeId); NS_LOG_INFO("TapBridge::ReadCallback(): Scheduling handler"); Simulator::ScheduleWithContext(m_nodeId, - Seconds(0.0), + Seconds(0), MakeEvent(&TapBridge::ForwardToBridgedDevice, this, buf, len)); } diff --git a/src/test/csma-system-test-suite.cc b/src/test/csma-system-test-suite.cc index 2736bb2d6..f199f2586 100644 --- a/src/test/csma-system-test-suite.cc +++ b/src/test/csma-system-test-suite.cc @@ -137,13 +137,13 @@ CsmaBridgeTestCase::DoRun() onoff.SetConstantRate(DataRate(5000)); ApplicationContainer app = onoff.Install(terminals.Get(0)); - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); app = sink.Install(terminals.Get(1)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); // Trace receptions Config::ConnectWithoutContext("/NodeList/1/ApplicationList/0/$ns3::PacketSink/Rx", @@ -274,16 +274,16 @@ CsmaBroadcastTestCase::DoRun() ApplicationContainer app = onoff.Install(c0.Get(0)); // Start the application - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); app = sink.Install(c0.Get(1)); app.Add(sink.Install(c1.Get(1))); - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Trace receptions Config::ConnectWithoutContext("/NodeList/1/ApplicationList/0/$ns3::PacketSink/Rx", @@ -465,8 +465,8 @@ CsmaMulticastTestCase::DoRun() ApplicationContainer sinkC = sink.Install(c1.Get(2)); // Node n4 // Start the sink - sinkC.Start(Seconds(1.0)); - sinkC.Stop(Seconds(10.0)); + sinkC.Start(Seconds(1)); + sinkC.Stop(Seconds(10)); // Trace receptions Config::ConnectWithoutContext("/NodeList/4/ApplicationList/0/$ns3::PacketSink/Rx", @@ -595,14 +595,14 @@ CsmaOneSubnetTestCase::DoRun() ApplicationContainer app = onoff.Install(nodes.Get(0)); // Start the application - app.Start(Seconds(1.0)); - app.Stop(Seconds(10.0)); + app.Start(Seconds(1)); + app.Stop(Seconds(10)); // Create an optional packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); app = sink.Install(nodes.Get(1)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); // // Create a similar flow from n3 to n0, starting at time 1.1 seconds @@ -610,10 +610,10 @@ CsmaOneSubnetTestCase::DoRun() onoff.SetAttribute("Remote", AddressValue(InetSocketAddress(interfaces.GetAddress(0), port))); app = onoff.Install(nodes.Get(3)); app.Start(Seconds(1.1)); - app.Stop(Seconds(10.0)); + app.Stop(Seconds(10)); app = sink.Install(nodes.Get(0)); - app.Start(Seconds(0.0)); + app.Start(Seconds(0)); // Trace receptions Config::ConnectWithoutContext("/NodeList/0/ApplicationList/1/$ns3::PacketSink/Rx", @@ -731,21 +731,21 @@ CsmaPacketSocketTestCase::DoRun() OnOffHelper onoff("ns3::PacketSocketFactory", Address(socket)); onoff.SetConstantRate(DataRate(5000)); ApplicationContainer apps = onoff.Install(nodes.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); socket.SetSingleDevice(devs.Get(3)->GetIfIndex()); socket.SetPhysicalAddress(devs.Get(0)->GetAddress()); socket.SetProtocol(3); onoff.SetAttribute("Remote", AddressValue(socket)); apps = onoff.Install(nodes.Get(3)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); PacketSinkHelper sink = PacketSinkHelper("ns3::PacketSocketFactory", socket); apps = sink.Install(nodes.Get(0)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(20.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(20)); // Trace receptions Config::Connect("/NodeList/0/ApplicationList/*/$ns3::PacketSink/Rx", @@ -864,13 +864,13 @@ CsmaPingTestCase::DoRun() onoff.SetConstantRate(DataRate(5000)); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); PacketSinkHelper sink = PacketSinkHelper("ns3::Ipv4RawSocketFactory", dst); apps = sink.Install(c.Get(3)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(11.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(11)); PingHelper ping(addresses.GetAddress(2)); NodeContainer pingers; @@ -878,8 +878,8 @@ CsmaPingTestCase::DoRun() pingers.Add(c.Get(1)); pingers.Add(c.Get(3)); apps = ping.Install(pingers); - apps.Start(Seconds(2.0)); - apps.Stop(Seconds(5.0)); + apps.Start(Seconds(2)); + apps.Stop(Seconds(5)); // Trace receptions Config::ConnectWithoutContext("/NodeList/3/ApplicationList/0/$ns3::PacketSink/Rx", @@ -998,13 +998,13 @@ CsmaRawIpSocketTestCase::DoRun() onoff.SetConstantRate(DataRate(5000)); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); PacketSinkHelper sink = PacketSinkHelper("ns3::Ipv4RawSocketFactory", dst); apps = sink.Install(c.Get(3)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(12.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(12)); // Trace receptions Config::ConnectWithoutContext("/NodeList/3/ApplicationList/0/$ns3::PacketSink/Rx", @@ -1158,8 +1158,8 @@ CsmaStarTestCase::DoRun() Address hubLocalAddress(InetSocketAddress(Ipv4Address::GetAny(), port)); PacketSinkHelper packetSinkHelper("ns3::TcpSocketFactory", hubLocalAddress); ApplicationContainer hubApp = packetSinkHelper.Install(star.GetHub()); - hubApp.Start(Seconds(1.0)); - hubApp.Stop(Seconds(10.0)); + hubApp.Start(Seconds(1)); + hubApp.Stop(Seconds(10)); // // Create OnOff applications to send TCP to the hub, one on each spoke node. @@ -1178,8 +1178,8 @@ CsmaStarTestCase::DoRun() spokeApps.Add(onOffHelper.Install(star.GetSpokeNode(i))); } - spokeApps.Start(Seconds(1.0)); - spokeApps.Stop(Seconds(10.0)); + spokeApps.Start(Seconds(1)); + spokeApps.Stop(Seconds(10)); // // Because we are evil, we also add OnOff applications to send TCP to the hub @@ -1198,8 +1198,8 @@ CsmaStarTestCase::DoRun() fillApps.Add(onOffHelper.Install(fillNodes.Get(i))); } - fillApps.Start(Seconds(1.0)); - fillApps.Stop(Seconds(10.0)); + fillApps.Start(Seconds(1)); + fillApps.Stop(Seconds(10)); // // Turn on global static routing so we can actually be routed across the star. diff --git a/src/test/ns3tc/fq-cobalt-queue-disc-test-suite.cc b/src/test/ns3tc/fq-cobalt-queue-disc-test-suite.cc index dc28cce17..174a7b025 100644 --- a/src/test/ns3tc/fq-cobalt-queue-disc-test-suite.cc +++ b/src/test/ns3tc/fq-cobalt-queue-disc-test-suite.cc @@ -946,7 +946,7 @@ FqCobaltQueueDiscEcnMarking::DoRun() // each queue DequeueWithDelay(queueDisc, 0.11, 60); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Ptr q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); Ptr q1 = @@ -1078,7 +1078,7 @@ FqCobaltQueueDiscEcnMarking::DoRun() // each queue DequeueWithDelay(queueDisc, 0.0001, 60); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); q1 = queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject(); q2 = queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject(); @@ -1216,7 +1216,7 @@ FqCobaltQueueDiscEcnMarking::DoRun() // each queue DequeueWithDelay(queueDisc, 0.110, 60); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); q1 = queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject(); q2 = queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject(); @@ -1586,7 +1586,7 @@ FqCobaltQueueDiscL4sMode::DoRun() delay = 0.001; DequeueWithDelay(queueDisc, delay, 140); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Ptr q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); Ptr q1 = @@ -1672,7 +1672,7 @@ FqCobaltQueueDiscL4sMode::DoRun() // Dequeue 140 packets with delay 1ms DequeueWithDelay(queueDisc, delay, 140); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); diff --git a/src/test/ns3tc/fq-codel-queue-disc-test-suite.cc b/src/test/ns3tc/fq-codel-queue-disc-test-suite.cc index f6a37179c..c331e14fe 100644 --- a/src/test/ns3tc/fq-codel-queue-disc-test-suite.cc +++ b/src/test/ns3tc/fq-codel-queue-disc-test-suite.cc @@ -905,7 +905,7 @@ FqCoDelQueueDiscECNMarking::DoRun() // each queue DequeueWithDelay(queueDisc, 0.11, 60); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Ptr q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); Ptr q1 = @@ -1086,7 +1086,7 @@ FqCoDelQueueDiscECNMarking::DoRun() // each queue DequeueWithDelay(queueDisc, 0.0001, 60); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); q1 = queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject(); q2 = queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject(); @@ -1247,7 +1247,7 @@ FqCoDelQueueDiscECNMarking::DoRun() // each queue DequeueWithDelay(queueDisc, 0.110, 60); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); q1 = queueDisc->GetQueueDiscClass(1)->GetQueueDisc()->GetObject(); q2 = queueDisc->GetQueueDiscClass(2)->GetQueueDisc()->GetObject(); @@ -1643,7 +1643,7 @@ FqCoDelQueueDiscL4sMode::DoRun() delay = 0.001; DequeueWithDelay(queueDisc, delay, 140); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Ptr q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); Ptr q1 = @@ -1723,7 +1723,7 @@ FqCoDelQueueDiscL4sMode::DoRun() // Dequeue 140 packets with delay 1ms DequeueWithDelay(queueDisc, delay, 140); Simulator::Run(); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); NS_TEST_EXPECT_MSG_EQ( diff --git a/src/test/ns3tc/fq-pie-queue-disc-test-suite.cc b/src/test/ns3tc/fq-pie-queue-disc-test-suite.cc index d117f8b4b..d0e567d70 100644 --- a/src/test/ns3tc/fq-pie-queue-disc-test-suite.cc +++ b/src/test/ns3tc/fq-pie-queue-disc-test-suite.cc @@ -1030,7 +1030,7 @@ FqPieQueueDiscL4sMode::DoRun() // Dequeue 140 packets with delay 1ms delay = 0.001; DequeueWithDelay(queueDisc, delay, 140); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Ptr q0 = @@ -1112,7 +1112,7 @@ FqPieQueueDiscL4sMode::DoRun() // Dequeue 140 packets with delay 1ms DequeueWithDelay(queueDisc, delay, 140); - Simulator::Stop(Seconds(1.0)); + Simulator::Stop(Seconds(1)); Simulator::Run(); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); q0 = queueDisc->GetQueueDiscClass(0)->GetQueueDisc()->GetObject(); diff --git a/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc b/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc index 876bcfb54..9776e8c1a 100644 --- a/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-cubic-test-suite.cc @@ -299,7 +299,7 @@ Ns3TcpCubicTestCase::DoRun() // Install application on the receiver PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), port)); ApplicationContainer sinkApps = sink.Install(receiver.Get(0)); - sinkApps.Start(Seconds(0.0)); + sinkApps.Start(Seconds(0)); sinkApps.Stop(stopTime); if (m_capacityIncrease) diff --git a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc index 3d93a4d25..1d6a36887 100644 --- a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc @@ -400,8 +400,8 @@ Ns3TcpLossTestCase::DoRun() PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), servPort)); ApplicationContainer apps = sink.Install(r1k1.Get(1)); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(100.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(100)); // Create a data source to send packets on node s0. // Instead of full application, here use the socket directly by diff --git a/src/test/ns3tcp/ns3tcp-no-delay-test-suite.cc b/src/test/ns3tcp/ns3tcp-no-delay-test-suite.cc index 46796c098..df8dd709d 100644 --- a/src/test/ns3tcp/ns3tcp-no-delay-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-no-delay-test-suite.cc @@ -117,7 +117,7 @@ Ns3TcpNoDelayTestCase::DoRun() InetSocketAddress(Ipv4Address::GetAny(), sinkPort)); ApplicationContainer apps = sink.Install(n1); // Start the sink application at time zero, and stop it at sinkStopTime - apps.Start(Seconds(0.0)); + apps.Start(Seconds(0)); apps.Stop(sinkStopTimeObj); Config::Connect("/NodeList/*/ApplicationList/*/$ns3::PacketSink/Rx", diff --git a/src/test/ns3tcp/ns3tcp-socket-test-suite.cc b/src/test/ns3tcp/ns3tcp-socket-test-suite.cc index 7d49aa080..21bb1fd71 100644 --- a/src/test/ns3tcp/ns3tcp-socket-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-socket-test-suite.cc @@ -112,7 +112,7 @@ Ns3TcpSocketTestCaseP2P::DoRun() InetSocketAddress(Ipv4Address::GetAny(), sinkPort)); ApplicationContainer apps = sink.Install(n1); // Start the sink application at time zero, and stop it at sinkStopTime - apps.Start(Seconds(0.0)); + apps.Start(Seconds(0)); apps.Stop(sinkStopTimeObj); Config::Connect("/NodeList/*/ApplicationList/*/$ns3::PacketSink/Rx", @@ -241,7 +241,7 @@ Ns3TcpSocketTestCaseCsma::DoRun() InetSocketAddress(Ipv4Address::GetAny(), sinkPort)); ApplicationContainer apps = sink.Install(n1); // Start the sink application at time zero, and stop it at sinkStopTime - apps.Start(Seconds(0.0)); + apps.Start(Seconds(0)); apps.Stop(sinkStopTimeObj); Config::Connect("/NodeList/*/ApplicationList/*/$ns3::PacketSink/Rx", diff --git a/src/test/ns3tcp/ns3tcp-state-test-suite.cc b/src/test/ns3tcp/ns3tcp-state-test-suite.cc index aa96d5e71..0d2e91d22 100644 --- a/src/test/ns3tcp/ns3tcp-state-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-state-test-suite.cc @@ -393,8 +393,8 @@ Ns3TcpStateTestCase::DoRun() PacketSinkHelper sink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), servPort)); ApplicationContainer sinkApps = sink.Install(n1n2.Get(1)); - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(100.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(100)); // Create a data source to send packets on node n0 // Instead of full application, here use the socket directly by diff --git a/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc b/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc index 7290a5a8e..9c0eb9936 100644 --- a/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc +++ b/src/test/ns3wifi/wifi-ac-mapping-test-suite.cc @@ -191,7 +191,7 @@ WifiAcMappingTest::DoRun() InetSocketAddress(Ipv4Address::GetAny(), udpPort)); ApplicationContainer sinkApp = packetSink.Install(sta.Get(0)); sinkApp.Start(Seconds(0)); - sinkApp.Stop(Seconds(4.0)); + sinkApp.Stop(Seconds(4)); // The packet source is an on-off application on the AP device InetSocketAddress dest(staNodeInterface.GetAddress(0), udpPort); @@ -199,14 +199,14 @@ WifiAcMappingTest::DoRun() onoff.SetConstantRate(DataRate("5kbps"), 500); onoff.SetAttribute("Tos", UintegerValue(m_tos)); ApplicationContainer sourceApp = onoff.Install(ap.Get(0)); - sourceApp.Start(Seconds(1.0)); - sourceApp.Stop(Seconds(4.0)); + sourceApp.Start(Seconds(1)); + sourceApp.Stop(Seconds(4)); // The first packet will be transmitted at time 1+(500*8)/5000 = 1.8s. // The second packet will be transmitted at time 1.8+(500*8)/5000 = 2.6s. // The third packet will be transmitted at time 2.6+(500*8)/5000 = 3.4s. - Simulator::Stop(Seconds(5.0)); + Simulator::Stop(Seconds(5)); Ptr root = ap.Get(0)->GetObject()->GetRootQueueDiscOnDevice(apDev.Get(0)); diff --git a/src/test/ns3wifi/wifi-issue-211-test-suite.cc b/src/test/ns3wifi/wifi-issue-211-test-suite.cc index 169fcaec5..34f0bb7c8 100644 --- a/src/test/ns3wifi/wifi-issue-211-test-suite.cc +++ b/src/test/ns3wifi/wifi-issue-211-test-suite.cc @@ -94,9 +94,9 @@ Issue211Test::CalcThroughput(Ptr server) void Issue211Test::DoRun() { - Time simulationTime(Seconds(6.0)); - Time moveAwayTime(Seconds(2.0)); - Time moveBackTime(Seconds(4.0)); + Time simulationTime(Seconds(6)); + Time moveAwayTime(Seconds(2)); + Time moveBackTime(Seconds(4)); RngSeedManager::SetSeed(1); RngSeedManager::SetRun(40); @@ -169,12 +169,12 @@ Issue211Test::DoRun() apNodeInterface = address.Assign(apDevices.Get(0)); ApplicationContainer serverApp; - Time warmup(Seconds(1.0)); // to account for association + Time warmup(Seconds(1)); // to account for association uint16_t port = 9; UdpServerHelper server(port); serverApp = server.Install(wifiStaNode.Get(0)); - serverApp.Start(Seconds(0.0)); + serverApp.Start(Seconds(0)); serverApp.Stop(warmup + simulationTime); UdpClientHelper client(staNodeInterface.GetAddress(0), port); diff --git a/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc b/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc index 5dfaa0948..4ae23a34c 100644 --- a/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc +++ b/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc @@ -140,7 +140,7 @@ WifiMsduAggregatorThroughputTest::DoRun() InetSocketAddress(Ipv4Address::GetAny(), udpPort)); ApplicationContainer sinkApp = packetSink.Install(sta.Get(0)); sinkApp.Start(Seconds(0)); - sinkApp.Stop(Seconds(9.0)); + sinkApp.Stop(Seconds(9)); // The packet source is an on-off application on the AP // device. Given that we have fixed the transmit rate at 1 Mbps @@ -153,8 +153,8 @@ WifiMsduAggregatorThroughputTest::DoRun() onoff.SetAttribute("PacketSize", UintegerValue(100)); onoff.SetConstantRate(DataRate("1Mbps")); ApplicationContainer sourceApp = onoff.Install(ap.Get(0)); - sourceApp.Start(Seconds(1.0)); - sourceApp.Stop(Seconds(9.0)); + sourceApp.Start(Seconds(1)); + sourceApp.Stop(Seconds(9)); // Enable tracing at the AP if (m_writeResults) @@ -163,7 +163,7 @@ WifiMsduAggregatorThroughputTest::DoRun() wifiPhy.EnablePcap("wifi-amsdu-throughput", sta.Get(0)->GetId(), 0); } - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/topology-read/examples/topology-example-sim.cc b/src/topology-read/examples/topology-example-sim.cc index 0bcce45d3..68e22b233 100644 --- a/src/topology-read/examples/topology-example-sim.cc +++ b/src/topology-read/examples/topology-example-sim.cc @@ -172,13 +172,13 @@ main(int argc, char* argv[]) } ApplicationContainer apps = onoff.Install(clientNodes); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(2.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(2)); PacketSinkHelper sink = PacketSinkHelper("ns3::Ipv4RawSocketFactory", dst); apps = sink.Install(randomServerNode); - apps.Start(Seconds(0.0)); - apps.Stop(Seconds(3.0)); + apps.Start(Seconds(0)); + apps.Stop(Seconds(3)); // we trap the packet sink receiver to extract the TTL. Config::ConnectWithoutContext("/NodeList/*/ApplicationList/*/$ns3::PacketSink/Rx", diff --git a/src/traffic-control/doc/traffic-control-layer.rst b/src/traffic-control/doc/traffic-control-layer.rst index 5e1d33660..166ad393f 100644 --- a/src/traffic-control/doc/traffic-control-layer.rst +++ b/src/traffic-control/doc/traffic-control-layer.rst @@ -70,7 +70,7 @@ Obviously the last point is the most important. Node::AddDevice (network/model/node.cc:128) assigns an interface index to the device, calls NetDevice::SetNode, sets the receive callback of the device to Node::NonPromiscReceiveFromDevice. Then, it schedules NetDevice::Initialize() method at -Seconds(0.0), then notify the registered DeviceAdditionListener handlers (not used BY ANYONE). +Seconds(0), then notify the registered DeviceAdditionListener handlers (not used BY ANYONE). Node::NonPromiscReceiveFromDevice calls Node::ReceiveFromDevice. diff --git a/src/traffic-control/examples/pfifo-vs-red.cc b/src/traffic-control/examples/pfifo-vs-red.cc index 7047288d7..f2e352ee5 100644 --- a/src/traffic-control/examples/pfifo-vs-red.cc +++ b/src/traffic-control/examples/pfifo-vs-red.cc @@ -139,8 +139,8 @@ main(int argc, char* argv[]) { sinkApps.Add(packetSinkHelper.Install(d.GetLeft(i))); } - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(30.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(30)); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount(); ++i) @@ -150,8 +150,8 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(1.0)); // Start 1 second after sink - clientApps.Stop(Seconds(15.0)); // Stop before the sink + clientApps.Start(Seconds(1)); // Start 1 second after sink + clientApps.Stop(Seconds(15)); // Stop before the sink Ipv4GlobalRoutingHelper::PopulateRoutingTables(); diff --git a/src/traffic-control/examples/red-tests.cc b/src/traffic-control/examples/red-tests.cc index dd21ad58d..7fa867c59 100644 --- a/src/traffic-control/examples/red-tests.cc +++ b/src/traffic-control/examples/red-tests.cc @@ -140,7 +140,7 @@ BuildAppsTest(uint32_t test) ApplicationContainer clientApps2; clientHelper2.SetAttribute("Remote", remoteAddress); clientApps2.Add(clientHelper2.Install(n1n2.Get(0))); - clientApps2.Start(Seconds(3.0)); + clientApps2.Start(Seconds(3)); clientApps2.Stop(Seconds(client_stop_time)); } else // 4 or 5 @@ -208,7 +208,7 @@ BuildAppsTest(uint32_t test) AddressValue remoteAddress2(InetSocketAddress(i3i5.GetAddress(1), port2)); clientHelper2.SetAttribute("Remote", remoteAddress2); clientApps2.Add(clientHelper2.Install(n1n2.Get(0))); - clientApps2.Start(Seconds(2.0)); + clientApps2.Start(Seconds(2)); clientApps2.Stop(Seconds(client_stop_time)); // Connection #3 @@ -240,7 +240,7 @@ BuildAppsTest(uint32_t test) AddressValue remoteAddress4(InetSocketAddress(i1i2.GetAddress(0), port4)); clientHelper4.SetAttribute("Remote", remoteAddress4); clientApps4.Add(clientHelper4.Install(n3n5.Get(1))); - clientApps4.Start(Seconds(1.0)); + clientApps4.Start(Seconds(1)); clientApps4.Stop(Seconds(client_stop_time)); } } diff --git a/src/traffic-control/examples/red-vs-ared.cc b/src/traffic-control/examples/red-vs-ared.cc index 12981ff88..6e94a7a92 100644 --- a/src/traffic-control/examples/red-vs-ared.cc +++ b/src/traffic-control/examples/red-vs-ared.cc @@ -139,8 +139,8 @@ main(int argc, char* argv[]) { sinkApps.Add(packetSinkHelper.Install(d.GetLeft(i))); } - sinkApps.Start(Seconds(0.0)); - sinkApps.Stop(Seconds(30.0)); + sinkApps.Start(Seconds(0)); + sinkApps.Stop(Seconds(30)); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount(); ++i) @@ -150,8 +150,8 @@ main(int argc, char* argv[]) clientHelper.SetAttribute("Remote", remoteAddress); clientApps.Add(clientHelper.Install(d.GetRight(i))); } - clientApps.Start(Seconds(1.0)); // Start 1 second after sink - clientApps.Stop(Seconds(15.0)); // Stop before the sink + clientApps.Start(Seconds(1)); // Start 1 second after sink + clientApps.Stop(Seconds(15)); // Stop before the sink Ipv4GlobalRoutingHelper::PopulateRoutingTables(); diff --git a/src/traffic-control/model/red-queue-disc.cc b/src/traffic-control/model/red-queue-disc.cc index fee9f38d3..25b356f0d 100644 --- a/src/traffic-control/model/red-queue-disc.cc +++ b/src/traffic-control/model/red-queue-disc.cc @@ -177,7 +177,7 @@ RedQueueDisc::GetTypeId() MakeDoubleChecker()) .AddAttribute("LastSet", "Store the last time m_curMaxP was updated", - TimeValue(Seconds(0.0)), + TimeValue(Seconds(0)), MakeTimeAccessor(&RedQueueDisc::m_lastSet), MakeTimeChecker()) .AddAttribute("Rtt", diff --git a/src/traffic-control/test/cobalt-queue-disc-test-suite.cc b/src/traffic-control/test/cobalt-queue-disc-test-suite.cc index 88303e36d..7b12ee7e5 100644 --- a/src/traffic-control/test/cobalt-queue-disc-test-suite.cc +++ b/src/traffic-control/test/cobalt-queue-disc-test-suite.cc @@ -318,7 +318,7 @@ CobaltQueueDiscDropTest::RunDropTest(QueueSizeUnit mode) EnqueueWithDelay(queue, 1, 200); } - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); QueueDisc::Stats st = queue->GetStats(); @@ -1106,7 +1106,7 @@ CobaltQueueDiscEnhancedBlueTest::DoRun() Enqueue(queue, modeSize, 200); DequeueWithDelay(queue, 100, MilliSeconds(10)); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); QueueDisc::Stats st = queue->GetStats(); @@ -1135,7 +1135,7 @@ CobaltQueueDiscEnhancedBlueTest::DoRun() Enqueue(queue, modeSize, 200); DequeueWithDelay(queue, 100, MilliSeconds(10)); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); diff --git a/src/traffic-control/test/pie-queue-disc-test-suite.cc b/src/traffic-control/test/pie-queue-disc-test-suite.cc index e73bd53e4..ca370da96 100644 --- a/src/traffic-control/test/pie-queue-disc-test-suite.cc +++ b/src/traffic-control/test/pie-queue-disc-test-suite.cc @@ -291,7 +291,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->Initialize(); EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.012, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); QueueDisc::Stats st = queue->GetStats(); uint32_t test2 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -324,7 +324,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->Initialize(); EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.012, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test3 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -357,7 +357,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->Initialize(); EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.015, 400); // delay between two successive dequeue events is increased - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test4 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -390,7 +390,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->Initialize(); EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.015, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test5 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -414,7 +414,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->Initialize(); EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test6 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -438,7 +438,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_checkProb = true; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test7 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -465,7 +465,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_checkProb = true; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test8 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -495,7 +495,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->Initialize(); EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test9 = st.GetNMarkedPackets(PieQueueDisc::UNFORCED_MARK); @@ -525,7 +525,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_ecnCapable = true; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test10 = st.GetNMarkedPackets(PieQueueDisc::UNFORCED_MARK); @@ -556,7 +556,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_checkProb = true; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test11 = st.GetNMarkedPackets(PieQueueDisc::UNFORCED_MARK); @@ -589,7 +589,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_checkAccuProb = true; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test12 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -619,7 +619,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_setAccuProb = -0.16; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test13 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -636,7 +636,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) queue->SetAttributeFailSafe("MaxSize", QueueSizeValue(QueueSize(mode, qSize))), true, "Verify that we can actually set the attribute MaxSize"); - NS_TEST_ASSERT_MSG_EQ(queue->SetAttributeFailSafe("MaxBurstAllowance", TimeValue(Seconds(0.0))), + NS_TEST_ASSERT_MSG_EQ(queue->SetAttributeFailSafe("MaxBurstAllowance", TimeValue(Seconds(0))), true, "Verify that we can actually set the attribute MaxBurstAllowance"); NS_TEST_ASSERT_MSG_EQ(queue->SetAttributeFailSafe("UseDerandomization", BooleanValue(true)), @@ -650,7 +650,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) testAttributes->m_setAccuProb = 8.6; EnqueueWithDelay(queue, pktSize, 400, testAttributes); DequeueWithDelay(queue, 0.014, 400); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test14 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -673,7 +673,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) EnqueueWithDelay(queue, pktSize, 100, testAttributes); DequeueWithDelay(queue, 0.02, 100); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test15 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); @@ -693,7 +693,7 @@ PieQueueDiscTestCase::RunPieTest(QueueSizeUnit mode) EnqueueWithDelay(queue, pktSize, 100, testAttributes); DequeueWithDelay(queue, 0.02, 100); - Simulator::Stop(Seconds(8.0)); + Simulator::Stop(Seconds(8)); Simulator::Run(); st = queue->GetStats(); uint32_t test16 = st.GetNDroppedPackets(PieQueueDisc::UNFORCED_DROP); diff --git a/src/uan/model/acoustic-modem-energy-model.cc b/src/uan/model/acoustic-modem-energy-model.cc index 7171f5474..e4215aebd 100644 --- a/src/uan/model/acoustic-modem-energy-model.cc +++ b/src/uan/model/acoustic-modem-energy-model.cc @@ -67,7 +67,7 @@ AcousticModemEnergyModel::AcousticModemEnergyModel() { NS_LOG_FUNCTION(this); m_currentState = UanPhy::IDLE; // initially IDLE - m_lastUpdateTime = Seconds(0.0); + m_lastUpdateTime = Seconds(0); m_energyDepletionCallback.Nullify(); m_node = nullptr; m_source = nullptr; diff --git a/src/uan/test/uan-test.cc b/src/uan/test/uan-test.cc index aab785cfa..34e46ad8e 100644 --- a/src/uan/test/uan-test.cc +++ b/src/uan/test/uan-test.cc @@ -154,7 +154,7 @@ UanTest::DoOnePhyTest(Time txTime1, Simulator::Schedule(txTime2, &UanTest::SendOnePacket, this, dev2, mode2); m_bytesRx = 0; - Simulator::Stop(Seconds(20.0)); + Simulator::Stop(Seconds(20)); Simulator::Run(); Simulator::Destroy(); @@ -179,12 +179,12 @@ UanTest::DoPhyTests() Ptr prop = CreateObject(); // No collision (Get 2 packets) - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1.0), Seconds(3.001), 50, 50, prop), + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(3.001), 50, 50, prop), 34, "Should have received 34 bytes from 2 disjoint packets"); // Collision (Lose both packets) - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1.0), Seconds(2.99), 50, 50, prop), + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(2.99), 50, 50, prop), 0, "Expected collision resulting in loss of both packets"); @@ -200,18 +200,18 @@ UanTest::DoPhyTests() #endif // UAN_PROP_BH_INSTALLED // No collision (Get 2 packets) - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1.0), Seconds(3.001), 50, 50, prop), + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(3.001), 50, 50, prop), 34, "Should have received 34 bytes from 2 disjoint packets"); // Should correctly receive first arriving packet - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1.0), Seconds(1.0126), 50, 50, prop), + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(1.0126), 50, 50, prop), 17, "Should have received 17 bytes from first arriving packet"); // Packets should collide and both be lost NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL( - DoOnePhyTest(Seconds(1.0), Seconds(1.0 + 7.01 * (13.0 / 80.0)), 50, 50, prop), + DoOnePhyTest(Seconds(1), Seconds(1.0 + 7.01 * (13.0 / 80.0)), 50, 50, prop), 0, "Packets should collide, but received data"); @@ -244,29 +244,25 @@ UanTest::DoPhyTests() m_phyFac.Set("SupportedModesPhy2", UanModesListValue(m1)); // No collision (Get 2 packets) - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1.0), Seconds(3.01), 50, 50, prop), + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(3.01), 50, 50, prop), 34, "Expected no collision"); - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL( - DoOnePhyTest(Seconds(1.0), Seconds(2.99), 50, 50, prop, 0, 0), - 0, - "Expected collision with both packets lost"); + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(2.99), 50, 50, prop, 0, 0), + 0, + "Expected collision with both packets lost"); - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL( - DoOnePhyTest(Seconds(1.0), Seconds(2.99), 50, 50, prop, 0, 2), - 17, - "Expected collision with only one packets lost"); + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(2.99), 50, 50, prop, 0, 2), + 17, + "Expected collision with only one packets lost"); - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL( - DoOnePhyTest(Seconds(1.0), Seconds(2.99), 50, 50, prop, 0, 5), - 34, - "Expected no collision"); + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(2.99), 50, 50, prop, 0, 5), + 34, + "Expected no collision"); - NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL( - DoOnePhyTest(Seconds(1.0), Seconds(2.99), 50, 50, prop, 2, 3), - 34, - "Expected no collision"); + NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL(DoOnePhyTest(Seconds(1), Seconds(2.99), 50, 50, prop, 2, 3), + 34, + "Expected no collision"); return false; } diff --git a/src/virtual-net-device/examples/virtual-net-device-example.cc b/src/virtual-net-device/examples/virtual-net-device-example.cc index 27068390c..f50aad6dc 100644 --- a/src/virtual-net-device/examples/virtual-net-device-example.cc +++ b/src/virtual-net-device/examples/virtual-net-device-example.cc @@ -314,21 +314,21 @@ main(int argc, char* argv[]) Address(InetSocketAddress(Ipv4Address("11.0.0.254"), port))); onoff.SetConstantRate(DataRate("448kb/s")); ApplicationContainer apps = onoff.Install(c.Get(0)); - apps.Start(Seconds(1.0)); - apps.Stop(Seconds(10.0)); + apps.Start(Seconds(1)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets PacketSinkHelper sink("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address::GetAny(), port))); apps = sink.Install(c.Get(3)); - apps.Start(Seconds(1.0)); + apps.Start(Seconds(1)); // apps.Stop (Seconds (10.0)); // Create a similar flow from n3 to n1, starting at time 1.1 seconds onoff.SetAttribute("Remote", AddressValue(InetSocketAddress(Ipv4Address("11.0.0.1"), port))); apps = onoff.Install(c.Get(3)); apps.Start(Seconds(1.1)); - apps.Stop(Seconds(10.0)); + apps.Stop(Seconds(10)); // Create a packet sink to receive these packets apps = sink.Install(c.Get(1)); diff --git a/src/wifi/examples/wifi-phy-rx-trace-example.cc b/src/wifi/examples/wifi-phy-rx-trace-example.cc index e3c06a53c..4b4271ae9 100644 --- a/src/wifi/examples/wifi-phy-rx-trace-example.cc +++ b/src/wifi/examples/wifi-phy-rx-trace-example.cc @@ -134,7 +134,7 @@ main(int argc, char* argv[]) double distance = 1; // meters bool enableTwoBss = false; // whether to enable a second (non-traced) BSS double distanceTwoBss = 10; // meters (distance between APs if enableTwoBss is true) - Time interval = Seconds(1.0); + Time interval = Seconds(1); bool verbose = true; bool logging = false; @@ -303,7 +303,7 @@ main(int argc, char* argv[]) rxTraceHelper.Stop(stopTime); Simulator::ScheduleWithContext(source->GetNode()->GetId(), - Seconds(1.0), + Seconds(1), &GeneratePacket, source, packetSize, diff --git a/src/wifi/helper/athstats-helper.cc b/src/wifi/helper/athstats-helper.cc index ce8803bc4..387adaaff 100644 --- a/src/wifi/helper/athstats-helper.cc +++ b/src/wifi/helper/athstats-helper.cc @@ -27,7 +27,7 @@ namespace ns3 NS_LOG_COMPONENT_DEFINE("Athstats"); AthstatsHelper::AthstatsHelper() - : m_interval(Seconds(1.0)) + : m_interval(Seconds(1)) { } @@ -110,7 +110,7 @@ AthstatsWifiTraceSink::GetTypeId() .AddConstructor() .AddAttribute("Interval", "Time interval between reports", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&AthstatsWifiTraceSink::m_interval), MakeTimeChecker()); return tid; diff --git a/src/wifi/model/rate-control/amrr-wifi-manager.cc b/src/wifi/model/rate-control/amrr-wifi-manager.cc index 1f5ce397c..886e9d4cc 100644 --- a/src/wifi/model/rate-control/amrr-wifi-manager.cc +++ b/src/wifi/model/rate-control/amrr-wifi-manager.cc @@ -50,7 +50,7 @@ AmrrWifiManager::GetTypeId() .AddConstructor() .AddAttribute("UpdatePeriod", "The interval between decisions about rate control changes", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&AmrrWifiManager::m_updatePeriod), MakeTimeChecker()) .AddAttribute( diff --git a/src/wifi/model/rate-control/onoe-wifi-manager.cc b/src/wifi/model/rate-control/onoe-wifi-manager.cc index dbdb26250..9159ede62 100644 --- a/src/wifi/model/rate-control/onoe-wifi-manager.cc +++ b/src/wifi/model/rate-control/onoe-wifi-manager.cc @@ -50,7 +50,7 @@ OnoeWifiManager::GetTypeId() .AddConstructor() .AddAttribute("UpdatePeriod", "The interval between decisions about rate control changes", - TimeValue(Seconds(1.0)), + TimeValue(Seconds(1)), MakeTimeAccessor(&OnoeWifiManager::m_updatePeriod), MakeTimeChecker()) .AddAttribute("RaiseThreshold", diff --git a/src/wifi/model/wifi-remote-station-info.cc b/src/wifi/model/wifi-remote-station-info.cc index 0a4302a46..7ca29c542 100644 --- a/src/wifi/model/wifi-remote-station-info.cc +++ b/src/wifi/model/wifi-remote-station-info.cc @@ -14,7 +14,7 @@ namespace ns3 { WifiRemoteStationInfo::WifiRemoteStationInfo() - : m_memoryTime(Seconds(1.0)), + : m_memoryTime(Seconds(1)), m_lastUpdate(), m_failAvg(0.0) { diff --git a/src/wifi/test/block-ack-test-suite.cc b/src/wifi/test/block-ack-test-suite.cc index ca1477c6d..06d437dbe 100644 --- a/src/wifi/test/block-ack-test-suite.cc +++ b/src/wifi/test/block-ack-test-suite.cc @@ -1958,7 +1958,7 @@ BlockAckAggregationDisabledTest::DoRun() client1->SetRemote(socket); wifiStaNode.Get(0)->AddApplication(client1); client1->SetStartTime(Seconds(1)); - client1->SetStopTime(Seconds(3.0)); + client1->SetStopTime(Seconds(3)); // the second client application generates 13 packets. Even if when the first // packet is queued the queue is empty, the first packet is not transmitted @@ -1971,13 +1971,13 @@ BlockAckAggregationDisabledTest::DoRun() client2->SetRemote(socket); wifiStaNode.Get(0)->AddApplication(client2); client2->SetStartTime(Seconds(1.5)); - client2->SetStopTime(Seconds(3.0)); + client2->SetStopTime(Seconds(3)); Ptr server = CreateObject(); server->SetLocal(socket); wifiApNode.Get(0)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(4.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(4)); Config::Connect("/NodeList/*/ApplicationList/0/$ns3::PacketSocketServer/Rx", MakeCallback(&BlockAckAggregationDisabledTest::L7Receive, this)); @@ -2215,13 +2215,13 @@ OrigBlockAckWindowStalled::DoSetup() client->SetRemote(socket); wifiStaNode.Get(0)->AddApplication(client); client->SetStartTime(Seconds(0.5)); - client->SetStopTime(Seconds(3.0)); + client->SetStopTime(Seconds(3)); auto server = CreateObject(); server->SetLocal(socket); wifiApNode.Get(0)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(4.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(4)); } void diff --git a/src/wifi/test/inter-bss-test-suite.cc b/src/wifi/test/inter-bss-test-suite.cc index 566d49bc7..fce3facae 100644 --- a/src/wifi/test/inter-bss-test-suite.cc +++ b/src/wifi/test/inter-bss-test-suite.cc @@ -315,87 +315,87 @@ TestInterBssConstantObssPdAlgo::SetupSimulation() // We test PHY state and verify whether a CCA reset did occur. // AP2 sends a packet 0.5s later. - Simulator::Schedule(Seconds(2.0), &TestInterBssConstantObssPdAlgo::ClearDropReasons, this); - Simulator::Schedule(Seconds(2.0), + Simulator::Schedule(Seconds(2), &TestInterBssConstantObssPdAlgo::ClearDropReasons, this); + Simulator::Schedule(Seconds(2), &TestInterBssConstantObssPdAlgo::SendOnePacket, this, ap_device2, sta_device2, m_payloadSize2); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(10), + Simulator::Schedule(Seconds(2) + MicroSeconds(10), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, ap_device2, WifiPhyState::TX); // All other PHYs should have stay idle until 4us (preamble detection time). - Simulator::Schedule(Seconds(2.0) + MicroSeconds(11), + Simulator::Schedule(Seconds(2) + MicroSeconds(11), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device1, WifiPhyState::IDLE); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(11), + Simulator::Schedule(Seconds(2) + MicroSeconds(11), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device2, WifiPhyState::IDLE); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(11), + Simulator::Schedule(Seconds(2) + MicroSeconds(11), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, ap_device1, WifiPhyState::IDLE); // All PHYs should be receiving the PHY header (i.e. PHY state is CCA_BUSY) if preamble has been // detected (always the case in this test). - Simulator::Schedule(Seconds(2.0) + MicroSeconds(14), + Simulator::Schedule(Seconds(2) + MicroSeconds(14), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device1, WifiPhyState::CCA_BUSY); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(14), + Simulator::Schedule(Seconds(2) + MicroSeconds(14), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device2, WifiPhyState::CCA_BUSY); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(14), + Simulator::Schedule(Seconds(2) + MicroSeconds(14), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, ap_device1, WifiPhyState::CCA_BUSY); // PHYs of AP1 and STA1 should be idle after HE-SIG-A if they were reset by OBSS_PD SR, // otherwise they should be CCA_busy until beginning of payload. - Simulator::Schedule(Seconds(2.0) + MicroSeconds(43), + Simulator::Schedule(Seconds(2) + MicroSeconds(43), &TestInterBssConstantObssPdAlgo::CheckPhyDropReasons, this, sta_device1, dropReasons); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(43), + Simulator::Schedule(Seconds(2) + MicroSeconds(43), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device1, expectPhyReset ? WifiPhyState::IDLE : WifiPhyState::CCA_BUSY); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(43), + Simulator::Schedule(Seconds(2) + MicroSeconds(43), &TestInterBssConstantObssPdAlgo::CheckPhyDropReasons, this, ap_device1, dropReasons); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(43), + Simulator::Schedule(Seconds(2) + MicroSeconds(43), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, ap_device1, expectPhyReset ? WifiPhyState::IDLE : WifiPhyState::CCA_BUSY); // PHYs of AP1 and STA1 should be idle if they were reset by OBSS_PD SR, otherwise they should // be CCA_busy/Rx (since filtered/not filtered, resp.). - Simulator::Schedule(Seconds(2.0) + MicroSeconds(54), + Simulator::Schedule(Seconds(2) + MicroSeconds(54), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device1, expectPhyReset ? WifiPhyState::IDLE : stateDuringPayloadNeighboringBss); - Simulator::Schedule(Seconds(2.0) + MicroSeconds(54), + Simulator::Schedule(Seconds(2) + MicroSeconds(54), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, ap_device1, expectPhyReset ? WifiPhyState::IDLE : stateDuringPayloadNeighboringBss); // STA2 should be receiving - Simulator::Schedule(Seconds(2.0) + MicroSeconds(54), + Simulator::Schedule(Seconds(2) + MicroSeconds(54), &TestInterBssConstantObssPdAlgo::CheckPhyState, this, sta_device2, diff --git a/src/wifi/test/power-rate-adaptation-test.cc b/src/wifi/test/power-rate-adaptation-test.cc index b3a7fc009..fb053dc35 100644 --- a/src/wifi/test/power-rate-adaptation-test.cc +++ b/src/wifi/test/power-rate-adaptation-test.cc @@ -1136,7 +1136,7 @@ PowerRateAdaptationTest::TestRrpaa() "RRPAA: Incorrect vale of data rate"); NS_TEST_ASSERT_MSG_EQ(power, 0, "RRPAA: Incorrect value of power level"); - Simulator::Stop(Seconds(10.0)); + Simulator::Stop(Seconds(10)); Simulator::Run(); Simulator::Destroy(); diff --git a/src/wifi/test/tx-duration-test.cc b/src/wifi/test/tx-duration-test.cc index 920b7eef2..447f0f748 100644 --- a/src/wifi/test/tx-duration-test.cc +++ b/src/wifi/test/tx-duration-test.cc @@ -1652,7 +1652,7 @@ PhyHeaderSectionsTest::CheckPhyHeaderSections(PhyEntity::PhyHeaderSections obtai void PhyHeaderSectionsTest::DoRun() { - Time ppduStart = Seconds(1.0); + Time ppduStart = Seconds(1); Ptr phyEntity; PhyEntity::PhyHeaderSections sections; WifiTxVector txVector; diff --git a/src/wifi/test/wifi-aggregation-test.cc b/src/wifi/test/wifi-aggregation-test.cc index 215d3adac..0904f486d 100644 --- a/src/wifi/test/wifi-aggregation-test.cc +++ b/src/wifi/test/wifi-aggregation-test.cc @@ -1172,7 +1172,7 @@ PreservePacketsInAmpdus::DoRun() client->SetRemote(socket); wifiStaNode.Get(0)->AddApplication(client); client->SetStartTime(Seconds(1)); - client->SetStopTime(Seconds(3.0)); + client->SetStopTime(Seconds(3)); Simulator::Schedule(Seconds(1.5), &PacketSocketClient::SetAttribute, client, @@ -1182,8 +1182,8 @@ PreservePacketsInAmpdus::DoRun() Ptr server = CreateObject(); server->SetLocal(socket); wifiApNode.Get(0)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(4.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(4)); sta_device->GetMac()->TraceConnectWithoutContext( "MacTx", diff --git a/src/wifi/test/wifi-channel-switching-test.cc b/src/wifi/test/wifi-channel-switching-test.cc index 9a0bde5b7..ea1da468f 100644 --- a/src/wifi/test/wifi-channel-switching-test.cc +++ b/src/wifi/test/wifi-channel-switching-test.cc @@ -177,13 +177,13 @@ WifiChannelSwitchingTest::SendPacket() client->SetRemote(socket); m_staNode.Get(0)->AddApplication(client); client->SetStartTime(Seconds(0.5)); - client->SetStopTime(Seconds(1.0)); + client->SetStopTime(Seconds(1)); auto server = CreateObject(); server->SetLocal(socket); m_apNode.Get(0)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(1.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(1)); } void @@ -209,7 +209,7 @@ WifiChannelSwitchingTest::StateChange(uint32_t nodeId, void WifiChannelSwitchingTest::DoRun() { - Time simulationTime(Seconds(6.0)); + Time simulationTime(Seconds(6)); RngSeedManager::SetSeed(1); RngSeedManager::SetRun(40); diff --git a/src/wifi/test/wifi-dynamic-bw-op-test.cc b/src/wifi/test/wifi-dynamic-bw-op-test.cc index ab857c873..224cce458 100644 --- a/src/wifi/test/wifi-dynamic-bw-op-test.cc +++ b/src/wifi/test/wifi-dynamic-bw-op-test.cc @@ -154,8 +154,8 @@ WifiUseAvailBwTest::Transmit(uint8_t bss, client->SetAttribute("Interval", TimeValue(MicroSeconds(0))); client->SetRemote(m_sockets[0]); m_apDevices.Get(0)->GetNode()->AddApplication(client); - client->SetStartTime(Seconds(0)); // start now - client->SetStopTime(Seconds(1.0)); // stop in a second + client->SetStartTime(Seconds(0)); // start now + client->SetStopTime(Seconds(1)); // stop in a second client->Initialize(); // after 1us (to allow for propagation delay), the largest idle primary @@ -266,7 +266,7 @@ WifiUseAvailBwTest::DoRun() client1->SetRemote(m_sockets[bss]); wifiApNodes.Get(bss)->AddApplication(client1); client1->SetStartTime(Seconds(0.5) + bss * MilliSeconds(500)); - client1->SetStopTime(Seconds(2.0)); + client1->SetStopTime(Seconds(2)); // At time 1.5, start a transmission in BSS 1 if (bss == 1) @@ -278,14 +278,14 @@ WifiUseAvailBwTest::DoRun() client2->SetRemote(m_sockets[bss]); wifiApNodes.Get(bss)->AddApplication(client2); client2->SetStartTime(Seconds(1.5)); - client2->SetStopTime(Seconds(2.0)); + client2->SetStopTime(Seconds(2)); } Ptr server = CreateObject(); server->SetLocal(m_sockets[bss]); wifiStaNodes.Get(bss)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(2.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(2)); // Trace received packets on non-AP STAs Config::ConnectWithoutContext("/NodeList/" + std::to_string(2 + bss) + diff --git a/src/wifi/test/wifi-emlsr-test.cc b/src/wifi/test/wifi-emlsr-test.cc index 3840a4c9c..711950fd3 100644 --- a/src/wifi/test/wifi-emlsr-test.cc +++ b/src/wifi/test/wifi-emlsr-test.cc @@ -3653,7 +3653,7 @@ EmlsrUlOfdmaTest::EmlsrUlOfdmaTest(bool enableBsrp) m_establishBaDl = false; m_establishBaUl = true; m_mainPhyId = 1; - m_duration = Seconds(1.0); + m_duration = Seconds(1); } void @@ -3975,7 +3975,7 @@ EmlsrLinkSwitchTest::EmlsrLinkSwitchTest(const Params& params) m_linksToEnableEmlsrOn = {0, 1, 2}; // enable EMLSR on all links right after association m_mainPhyId = 1; m_establishBaDl = true; - m_duration = Seconds(1.0); + m_duration = Seconds(1); // when aux PHYs do not switch link, the main PHY switches back to its previous link after // a TXOP, hence the transition delay must exceed the channel switch delay (default: 250us) m_transitionDelay = {MicroSeconds(128)}; @@ -4580,7 +4580,7 @@ EmlsrCcaBusyTest::EmlsrCcaBusyTest(uint16_t auxPhyMaxChWidth) m_linksToEnableEmlsrOn = {0, 1, 2}; // enable EMLSR on all links right after association m_mainPhyId = 1; m_establishBaUl = true; - m_duration = Seconds(1.0); + m_duration = Seconds(1); m_transitionDelay = {MicroSeconds(128)}; } diff --git a/src/wifi/test/wifi-mac-ofdma-test.cc b/src/wifi/test/wifi-mac-ofdma-test.cc index f77d15924..510ca0cf0 100644 --- a/src/wifi/test/wifi-mac-ofdma-test.cc +++ b/src/wifi/test/wifi-mac-ofdma-test.cc @@ -695,8 +695,8 @@ OfdmaAckSequenceTest::Transmit(std::string context, client->SetAttribute("Priority", UintegerValue(i * 2)); // 0, 2, 4 and 6 client->SetRemote(m_sockets[i]); m_staDevices.Get(i)->GetNode()->AddApplication(client); - client->SetStartTime(txDuration); // start when TX ends - client->SetStopTime(Seconds(1.0)); // stop in a second + client->SetStartTime(txDuration); // start when TX ends + client->SetStopTime(Seconds(1)); // stop in a second client->Initialize(); } m_ulPktsGenerated = true; @@ -2265,7 +2265,7 @@ OfdmaAckSequenceTest::DoRun() client1->SetRemote(socket); wifiApNode.Get(0)->AddApplication(client1); client1->SetStartTime(Seconds(1) + i * MilliSeconds(1)); - client1->SetStopTime(Seconds(2.0)); + client1->SetStopTime(Seconds(2)); // the second client application generates the selected number of packets, // which are sent in DL MU PPDUs. @@ -2282,8 +2282,8 @@ OfdmaAckSequenceTest::DoRun() Ptr server = CreateObject(); server->SetLocal(socket); wifiStaNodes.Get(i)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(3.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(3)); } // UL Traffic @@ -2303,7 +2303,7 @@ OfdmaAckSequenceTest::DoRun() client1->SetRemote(m_sockets[i]); wifiStaNodes.Get(i)->AddApplication(client1); client1->SetStartTime(Seconds(1.005) + i * MilliSeconds(1)); - client1->SetStopTime(Seconds(2.0)); + client1->SetStopTime(Seconds(2)); // packets to be included in HE TB PPDUs are generated (by Transmit()) when // the first Basic Trigger Frame is sent by the AP @@ -2311,8 +2311,8 @@ OfdmaAckSequenceTest::DoRun() Ptr server = CreateObject(); server->SetLocal(m_sockets[i]); wifiApNode.Get(0)->AddApplication(server); - server->SetStartTime(Seconds(0.0)); - server->SetStopTime(Seconds(3.0)); + server->SetStartTime(Seconds(0)); + server->SetStopTime(Seconds(3)); } Config::Connect("/NodeList/*/ApplicationList/0/$ns3::PacketSocketServer/Rx", diff --git a/src/wifi/test/wifi-non-ht-dup-test.cc b/src/wifi/test/wifi-non-ht-dup-test.cc index ccfb4341a..92e4c76b8 100644 --- a/src/wifi/test/wifi-non-ht-dup-test.cc +++ b/src/wifi/test/wifi-non-ht-dup-test.cc @@ -1009,13 +1009,13 @@ void TestMultipleCtsResponsesFromMuRts::DoRun() { // Fake transmission of a MU-RTS frame preceding the CTS responses - Simulator::Schedule(Seconds(0.0), &TestMultipleCtsResponsesFromMuRts::FakePreviousMuRts, this); + Simulator::Schedule(Seconds(0), &TestMultipleCtsResponsesFromMuRts::FakePreviousMuRts, this); for (std::size_t index = 0; index < m_phyStas.size(); ++index) { // Transmit CTS responses over their operating bandwidth with 1 nanosecond delay between // each other - const auto delay = (index + 1) * NanoSeconds(1.0); + const auto delay = (index + 1) * NanoSeconds(1); Simulator::Schedule(delay, &TestMultipleCtsResponsesFromMuRts::TxNonHtDuplicateCts, this, @@ -1024,7 +1024,7 @@ TestMultipleCtsResponsesFromMuRts::DoRun() // Verify successful reception of the CTS frames: since multiple copies are sent // simultaneously, a single CTS frame should be forwarded up to the MAC. - Simulator::Schedule(Seconds(1.0), &TestMultipleCtsResponsesFromMuRts::CheckResults, this); + Simulator::Schedule(Seconds(1), &TestMultipleCtsResponsesFromMuRts::CheckResults, this); Simulator::Run(); Simulator::Destroy(); diff --git a/src/wifi/test/wifi-phy-cca-test.cc b/src/wifi/test/wifi-phy-cca-test.cc index b0da8de27..084bc21da 100644 --- a/src/wifi/test/wifi-phy-cca-test.cc +++ b/src/wifi/test/wifi-phy-cca-test.cc @@ -1107,7 +1107,7 @@ WifiPhyCcaIndicationTest::RunOne() std::vector