Skip to content

willem66745/ntpclient-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntpclient-rust

Very simple Rust library to retrieve a time stamp from a NTP server.

NOTE: These are my first baby steps developing code using Rust.

use time::{Timespec,at};
use ntpclient::retrieve_ntp_timestamp;

let timestamp :Timespec = retrieve_ntp_timestamp("sundial.columbia.edu").unwrap();
println!("Internet time: {}", at(timestamp).asctime());

About

Simple NTP client in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages