Kendziorra - ESP8266 NTP client library with timestamp in milliseconds
Last Arduino/ESP8266 project (click to open)

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 


Serial.print: Every second an update.
 Date & Time (+ zone) with Arduino Time Library TimeLib.h is optional.

Timestamp in millisseconds:
Useful in real-time communication is a timestamp in milliseconds (WebSocket-Publish/Subscribe).

Optional:
Can Sync Arduino TimeLib.h (replacement of Time.h).

#ifdef USE_TIME
  time_t getTime() {  // Sync Provider: sync time with NTP time
    int zone = 3600;  // +1 (MET)
    return ntp.timestamp + zone;  // UTC/GMT+MET
  }
#endif

void setup()
{
  ...
  ...
#ifdef USE_TIME
  setSyncProvider(getTime);
#endif
}