Update library (02 Feb 2015)

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed

Fork of NTPClient_HelloWorld by Donatien Garnier

Files at this revision

API Documentation at this revision

Comitter:
ban4jp
Date:
Sun Feb 01 16:44:57 2015 +0000
Parent:
2:bf7dc5f5bca9
Child:
4:06cde8b92c77
Commit message:
Update library (02 Feb 2015); Format code.

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
NTPClient.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Sun Aug 05 16:17:31 2012 +0000
+++ b/EthernetInterface.lib	Sun Feb 01 16:44:57 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#2a797ba9babe
+http://developer.mbed.org/users/mbed_official/code/EthernetInterface/#d1ccbed7687a
--- a/NTPClient.lib	Sun Aug 05 16:17:31 2012 +0000
+++ b/NTPClient.lib	Sun Feb 01 16:44:57 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/donatien/code/NTPClient/#881559865a93
+http://developer.mbed.org/users/ban4jp/code/NTPClient/#15c04f752381
--- a/main.cpp	Sun Aug 05 16:17:31 2012 +0000
+++ b/main.cpp	Sun Feb 01 16:44:57 2015 +0000
@@ -5,26 +5,23 @@
 EthernetInterface eth;
 NTPClient ntp;
 
-int main() 
+int main()
 {
     eth.init(); //Use DHCP
 
     eth.connect();
-   
+
     printf("Trying to update time...\r\n");
-    if (ntp.setTime("0.pool.ntp.org") == 0)
-    {
-      printf("Set time successfully\r\n");
-      time_t ctTime;
-      ctTime = time(NULL);
-      printf("Time is set to (UTC): %s\r\n", ctime(&ctTime));
+    if (ntp.setTime("0.pool.ntp.org") == 0) {
+        printf("Set time successfully\r\n");
+        time_t ctTime;
+        ctTime = time(NULL);
+        printf("Time is set to (UTC): %s\r\n", ctime(&ctTime));
+    } else {
+        printf("Error\r\n");
     }
-    else
-    {
-      printf("Error\r\n");
-    } 
-   
-    eth.disconnect();  
+
+    eth.disconnect();
 
     while(1) {
     }
--- a/mbed-rtos.lib	Sun Aug 05 16:17:31 2012 +0000
+++ b/mbed-rtos.lib	Sun Feb 01 16:44:57 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#9654a71f5a90
+http://developer.mbed.org/users/mbed_official/code/mbed-rtos/#5448826aa700
--- a/mbed.bld	Sun Aug 05 16:17:31 2012 +0000
+++ b/mbed.bld	Sun Feb 01 16:44:57 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/976df7c37ad5
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file