Skip to content
Snippets Groups Projects
Commit 813a2cb4 authored by brutzman's avatar brutzman
Browse files

note timing in output log

parent 990c758d
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,8 @@ warning: [options] system modules path not set in conjunction with -source 11
1 warning
compile:
run:
Sending 20 ESPDU packets on broadcast address=[/192.168.1.255] port 3000
Sending 20 ESPDU packets at 1000 msec (1.0 second) intervals on
broadcast address=[/172.20.209.165, /172.16.0.255] port 3000
Current position: 0.0, 1.0, 0.0
... sent 1
Current position: 0.0, 2.0, 0.0
......@@ -50,4 +51,3 @@ Current position: 0.0, 19.0, 0.0
Current position: 0.0, 20.0, 0.0
... sent 20
BUILD SUCCESSFUL (total time: 21 seconds)
......@@ -31,6 +31,7 @@ public class DisDemo {
int NUMBER_OF_SENDS = 20;
int PORT = 3000;
int INTERVAL_MSEC = 1000; // 1 second
// Create a new coordinate system at the give latitude, longitude, and altitude
RangeCoordinates rangeCoordinates = new RangeCoordinates(31.435, 45.223, 17.0);
......@@ -78,7 +79,10 @@ public class DisDemo {
DatagramPacket packet;
// Do some movement for a while
System.out.println ("Sending " + NUMBER_OF_SENDS + " ESPDU packets on broadcast address=" + allBcasts + " port " + PORT);
System.out.println ("Sending " + NUMBER_OF_SENDS + " ESPDU packets at " +
INTERVAL_MSEC + " msec (" + INTERVAL_MSEC/1000.0 +
" second) intervals on");
System.out.println (" broadcast address=" + allBcasts + " port " + PORT);
for(int index = 1; index <= NUMBER_OF_SENDS; index++)
{
mover.step();
......@@ -102,7 +106,7 @@ public class DisDemo {
socket.send(packet);
}
Thread.sleep(1000);
Thread.sleep(INTERVAL_MSEC);
System.out.println("... sent " + index);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment