ntp 0.0.2 copy "ntp: ^0.0.2" to clipboard
ntp: ^0.0.2 copied to clipboard

outdated

Fetch accurate time from NTP server

ntp #

Get local clock offset in milliseconds from NTP services

Add offset from getNtpTime

example:

  NTP ntp = new NTP();
  
  DateTime startDate = new DateTime().now().toLocal();
  
  int offset = await ntp.getNtpTime(localTime: startDate);
  
  print('NTP Align: ${startDate.add(new Duration(milliseconds: offset))}');
242
likes
10
points
83.5k
downloads

Publisher

verified publishersquare-pear.com

Weekly Downloads

Fetch accurate time from NTP server

Repository (GitHub)

License

unknown (license)

Dependencies

flutter

More

Packages that depend on ntp