diff --git a/examples/DisShooting/src/DisShooting/NetworkComms.java b/examples/DisShooting/src/DisShooting/NetworkComms.java index ddc743154d9cfcb657f099975b0b4e877556366b..09197b72c5c97ca54a9ecf39c21425bfa1b7808b 100644 --- a/examples/DisShooting/src/DisShooting/NetworkComms.java +++ b/examples/DisShooting/src/DisShooting/NetworkComms.java @@ -1,9 +1,8 @@ package DisShooting; -import edu.nps.moves.dis7.pdus.DisTime; import edu.nps.moves.dis7.pdus.Pdu; -import edu.nps.moves.dis7.utilities.*; - +import edu.nps.moves.dis7.utilities.DisTime; +import edu.nps.moves.dis7.utilities.PduFactory; import java.io.IOException; import java.net.*; import java.nio.ByteBuffer; @@ -27,7 +26,6 @@ public class NetworkComms implements Runnable private PduFactory pduFactory; private DatagramPacket sendPacket, receivePacket; private ByteBuffer buffSend, buffReceive; - private DisTime time; /** people we notify when we receive a PDU */ private List<PduListener> listeners; @@ -57,8 +55,6 @@ public class NetworkComms implements Runnable try { - time = new DisTime(); - // Some fancy footwork to allow us to open a UDP socket even if // anther program has already opened a socket on that port. Opens // on the wildcard address, i.e. all configured interfaces, both @@ -116,7 +112,7 @@ public class NetworkComms implements Runnable * @param aPdu to send */ public void sendPdu(Pdu aPdu) { - aPdu.setTimestamp(time.getDisAbsoluteTimestamp()); + aPdu.setTimestamp(DisTime.getCurrentDisAbsoluteTimestamp()); try { sendPacket.setData(aPdu.marshal()); if (!socket.isClosed())