Interface INtpClient
Interface for a Network Time Protocol (NTP) client object.
Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface INtpClient
Properties
Enabled
Gets a value indicating whether the NTP client is enabled.
View Source
Declaration
bool Enabled { get; }
PollPeriod
Gets or sets the poll period for NTP synchronization.
View Source
Declaration
TimeSpan PollPeriod { get; set; }
Methods
Synchronize(string?)
Start an NTP time synchronization
View Source
Declaration
Task<bool> Synchronize(string? ntpServer = null)
Returns
System.Threading.Tasks.Task<System.Boolean>
: <b>true</b> if successful, otherwise <b>false</b>
Parameters
Type | Name | Description |
---|---|---|
System.String | ntpServer | An optional NTP server address. If null, the device will use the platform-configured NTP server address |
Events
TimeChanged
Event called when the time is changed.
View Source
Declaration
event TimeChangedEventHandler TimeChanged