10000 GitHub - passcod/timesimp: Simple sans-io timesync client and server
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Simple sans-io timesync client and server

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

passcod/timesimp

Repository files navigation

Time simp ⏰

Simple sans-io timesync client and server.

How does it work?

Timesimp is based on the averaging method described in Simpson (2002), A Stream-based Time Synchronization Technique For Networked Computer Games, but with a corrected delta calculation. Compared to NTP, it's a simpler and less accurate time synchronisation algorithm that is usable over network streams, rather than datagrams. Simpson asserts they were able to achieve accuracies of 100ms or better, which is sufficient in many cases; my testing gets accuracies well below 5ms. The main limitation of the algorithm is that round-trip-time is assumed to be symmetric: if the forward trip time is different from the return trip time, then an error is induced equal to the value of the difference in trip times.

This library provides a sans-io implementation: you bring in your transport and storage, you get time offsets. There's the core Rust crate and Node.js bindings.

How do I use it?

Rust

Node.js

About

Simple sans-io timesync client and server

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published
0