Update library (02 Feb 2015)
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
Fork of NTPClient_HelloWorld by
Revision 4:06cde8b92c77, committed 2015-02-01
- Comitter:
- ban4jp
- Date:
- Sun Feb 01 16:59:48 2015 +0000
- Parent:
- 3:cefa72855d43
- Child:
- 5:ef9b500c56e2
- Commit message:
- Change Line feed code. (CRLF => LF); Capture the return value.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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) {
}
ban4jp -
