TimeService Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

A static class that controls time service.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Time..::..TimeService

Namespace:  Microsoft.SPOT.Time
Assembly:  Microsoft.SPOT.Time (in Microsoft.SPOT.Time.dll)

Syntax

'Declaration
Public NotInheritable Class TimeService
public static class TimeService
public ref class TimeService abstract sealed
[<AbstractClass>]
[<Sealed>]
type TimeService =  class end
public final class TimeService

The TimeService type exposes the following members.

Properties

  Name Description
Public propertyStatic member LastSyncStatus Returns the latest sync status.
Public propertyStatic member Settings Gets or sets the time service settings.

Top

Methods

  Name Description
Public methodStatic member SetTimeZoneOffset Sets the time zone of the system.
Public methodStatic member SetUtcTime Sets the UTC time of the system.
Public methodStatic member Start Starts the scheduled time synchronization service.
Public methodStatic member Stop Stops the periodic time synchronization service.
Public methodStatic member UpdateNow(UInt32) Immediately syncs with time servers using the Primary and Alternate server IP that has already been set via settings.
Public methodStatic member UpdateNow(array<Byte> [] () [] [], UInt32) Manually updates the system time value from the specified server.

Top

Events

  Name Description
Public eventStatic member SystemTimeChanged Occurs when the system time changed.
Public eventStatic member TimeSyncFailed Occurs when time sync fails.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SPOT.Time Namespace