Code example for Stopwatch

0
     
    public static void main(String[] args) throws  Exception {
        Injector injector = Guice.createInjector(new AsynchronousServerModule());
        AsyncSocketServerGuiceExample socketServer = injector.getInstance(AsyncSocketServerGuiceExample.class);
        System.out.println("Starting the EchoSever");
        Stopwatch stopwatch = new Stopwatch().start();
        socketServer.runServer();
        stopwatch.stop();
        System.out.println("EchoServer is done in "+stopwatch.elapsedMillis());
    } 
} 
Experience pair programming with AI  Get Codota for Java