Separate library that holds helper functions for the main OMF code.

Revision:
9:e2d177cf9135
Parent:
8:e5fe40b77f8f
Child:
10:844e209f1d79
diff -r e5fe40b77f8f -r e2d177cf9135 osisoft-omf.cpp
--- a/osisoft-omf.cpp	Wed Mar 14 14:14:51 2018 +0000
+++ b/osisoft-omf.cpp	Wed Mar 14 16:34:47 2018 +0000
@@ -164,7 +164,7 @@
 }
 
 // ************************************************************************
-// Sets the clock via NTP via the nwtwork
+// Sets the clock via NTP via the nwtwork; can point to a local or internet-based server
 // ************************************************************************
 
 void OMFLib_syncClockViaNTP(NetworkInterface* network) {
@@ -174,7 +174,13 @@
     printf("\n\r----- Setting internal clock -----\n\r");
     // See https://github.com/ARMmbed/ntp-client-example/blob/master/main.cpp
     
+    // Connect the ntp object to the network
     NTPClient ntp(network);
+    
+    // Set the ntp server to either an internet-based server OR to a local server
+    ntp.set_server("2.pool.ntp.org", 123);
+    
+    // Get the timestamp via NTP
     time_t timestamp = ntp.get_timestamp();
     if (timestamp > 0) {
         set_time(timestamp);