Skip to content
Permalink
Browse files
Formatting.
  • Loading branch information
garydgregory committed Feb 20, 2021
1 parent dcb80d0 commit cbd2623015cb91845ecc3019fe97e45166ce9026
Showing 1 changed file with 3 additions and 5 deletions.
@@ -65,8 +65,7 @@ public final class TimeUDPClient extends DatagramSocketClient
*/
public Date getDate(final InetAddress host) throws IOException
{
return new Date((getTime(host, DEFAULT_PORT) -
SECONDS_1900_TO_1970)*1000L);
return new Date((getTime(host, DEFAULT_PORT) - SECONDS_1900_TO_1970) * 1000L);
}

/**
@@ -81,7 +80,7 @@ public Date getDate(final InetAddress host) throws IOException
*/
public Date getDate(final InetAddress host, final int port) throws IOException
{
return new Date((getTime(host, port) - SECONDS_1900_TO_1970)*1000L);
return new Date((getTime(host, port) - SECONDS_1900_TO_1970) * 1000L);
}


@@ -115,8 +114,7 @@ public long getTime(final InetAddress host, final int port) throws IOException
final DatagramPacket sendPacket;
final DatagramPacket receivePacket;

sendPacket =
new DatagramPacket(dummyData, dummyData.length, host, port);
sendPacket = new DatagramPacket(dummyData, dummyData.length, host, port);
receivePacket = new DatagramPacket(timeData, timeData.length);

_socket_.send(sendPacket);

0 comments on commit cbd2623

Please sign in to comment.