Display error reason on ntp time sync fail
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
|
||||
@@ -30,6 +31,10 @@ namespace HalClock {
|
||||
/// Returns true if the sync succeeded.
|
||||
bool syncNtp();
|
||||
|
||||
/// Same as syncNtp(), but fills `errorBuf` with a short failure reason when
|
||||
/// the sync fails.
|
||||
bool syncNtp(char* errorBuf, size_t errorBufSize);
|
||||
|
||||
/// Apply timezone/DST rules via the POSIX TZ string for the given setting.
|
||||
void applyTimezone(uint8_t timeZoneSetting);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user