LCD clock display set using NTP server

Dependencies:   EthernetNetIf NTPClient_NetServices TextLCD mbed

Revision:
1:09fcc9b81f23
Parent:
0:5c5226aac712
--- a/Internet_LCD_Clock.cpp	Thu Apr 12 01:44:02 2012 +0000
+++ b/Internet_LCD_Clock.cpp	Sat Apr 14 01:12:23 2012 +0000
@@ -18,19 +18,16 @@
     //Get an Internet IP address using DHCP
     if (ethErr) {
         //error or timeout getting an IP address
-        printf("Error %d in setup.\n\r", ethErr);
         lcd.cls();
         lcd.printf("Network Error \n\r %d",ethErr);
         return -1;
     }
     lcd.cls();
-    ctTime = time(NULL);
     lcd.printf("Reading Time...\n\r");
     //specify time server URL
     Host server(IpAddr(), 123, "0.uk.pool.ntp.org");
     //Read time from server
     ntp.setTime(server);
-    ctTime = time(NULL);
     lcd.printf("Time set");
     //Delay for human time to read LCD display
     wait(1);