Yort.Ntp 3.0.1-beta

Prefix Reserved
This is a prerelease version of Yort.Ntp.
dotnet add package Yort.Ntp --version 3.0.1-beta                
NuGet\Install-Package Yort.Ntp -Version 3.0.1-beta                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Yort.Ntp" Version="3.0.1-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Yort.Ntp --version 3.0.1-beta                
#r "nuget: Yort.Ntp, 3.0.1-beta"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Yort.Ntp as a Cake Addin
#addin nuget:?package=Yort.Ntp&version=3.0.1-beta&prerelease

// Install Yort.Ntp as a Cake Tool
#tool nuget:?package=Yort.Ntp&version=3.0.1-beta&prerelease                

Yort.Ntp

A cross platform NTP client library for .Net platforms. Allows you to easily retrieve an accurate, current date & time from internet NTP servers.

GitHub license

Supported Platforms

Currently;

  • .Net Framework 4.0+
  • .Net Framework 4.5+ **
  • .Net Framework 4.8+ **
  • .Net Standard 1.3
  • .Net Standard 2.0 **
  • .Net 8.0 **
  • .Net 8.0-android **
  • .Net 8.0-ios **
  • Xamarin.iOS (xamarin.ios10) **
  • Xamarin.Android (monoandroid9.0) **
  • UWP 10+ (Windows 10 Universal Programs) **

** Supports async/await

Build Status

Build status

Available on Nuget

    PM> Install-Package Yort.Ntp

NuGet Badge

Samples

For platforms that support task based async;

var client = new Yort.Ntp.NtpClient();
var currentTime = await client.RequestTimeAsync();

For platforms that do not support async/await or tasks (or if you don't want to use async/await);

var client = new Yort.Ntp.NtpClient();
client.TimeReceived += Client_TimeReceived;
client.ErrorOccurred += Client_ErrorOccurred;
client.BeginRequestTime();

private void Client_ErrorOccurred(object sender, NtpNetworkErrorEventArgs e)
{
	//TODO: Handle errors here.
}

private void Client_TimeReceived(object sender, NtpTimeReceivedEventArgs e)
{
    //TODO: Use retrieved time here. Time is provided by e.CurrentTime.
	System.Diagnostics.Debug.WriteLine(e.CurrentTime);
}

Attributions

The icon for this project is Computer Time by Arthur Shlain from the Noun Project and is used under the Creative Commons License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios17.5 is compatible.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid90 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed.  uap10.0.15063 is compatible. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 1.3

  • .NETStandard 2.0

    • No dependencies.
  • MonoAndroid 9.0

    • No dependencies.
  • net8.0-android34.0

    • No dependencies.
  • net8.0-ios17.5

    • No dependencies.
  • UAP 10.0.15063

    • No dependencies.
  • Xamarin.iOS 1.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.1-beta 52 10/6/2024
3.0.0-beta 43 10/5/2024

New major version:

* Adds supports for modern platforms
* Drops supports for older platforms such as Windows Phone
* Adds async method to additional platforms
* Fixes a bug on linux