package testRMI;

import java.rmi.RemoteException;

public class TimeClient {
	public static void main(String[] args) {
		if (args.length != 1) {
			System.err.println("Sintaxe: java TimeClient port");
			System.exit(1);
		} else {
			try {
				int port = Integer.parseInt(args[0]);
				System.out.println("Connecting to " + port);
				Second sgen = ImportChannel.imp("localhost", port);
				System.out.println("$< " + sgen.getMilliSeconds());
			} catch (RemoteException e) {
				e.printStackTrace();
			}
		}
	}
}