Update library (02 Feb 2015)

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed

Fork of NTPClient_HelloWorld by Donatien Garnier

Revision:
4:06cde8b92c77
Parent:
3:cefa72855d43
Child:
5:ef9b500c56e2
--- a/main.cpp	Sun Feb 01 16:44:57 2015 +0000
+++ b/main.cpp	Sun Feb 01 16:59:48 2015 +0000
@@ -7,21 +7,21 @@
 
 int main()
 {
-    eth.init(); //Use DHCP
+    int ret = eth.init(); //Use DHCP
 
-    eth.connect();
+    ret = eth.connect();
 
-    printf("Trying to update time...\r\n");
+    printf("Trying to update time...\n");
     if (ntp.setTime("0.pool.ntp.org") == 0) {
-        printf("Set time successfully\r\n");
+        printf("Set time successfully\n");
         time_t ctTime;
         ctTime = time(NULL);
-        printf("Time is set to (UTC): %s\r\n", ctime(&ctTime));
+        printf("Time is set to (UTC): %s\n", ctime(&ctTime));
     } else {
-        printf("Error\r\n");
+        printf("Error\n");
     }
 
-    eth.disconnect();
+    ret = eth.disconnect();
 
     while(1) {
     }