#world #keeping #clock #precise #server #time #ntp

ya-world-time

Library for getting current time from the world clock

2 releases

0.1.3 Apr 9, 2023
0.1.1 Apr 5, 2023

#11 in #keeping


Used in ya-world-time-sync

MIT license

13KB
285 lines

ya-world-time

Library for keeping time as precise as possible

Variables

#provide list of time servers
YA_WORLD_TIME_SERVER_HOSTS=time.google.com;ntp.qix.ca;ntp.nict.jp;pool.ntp.org;time.cloudflare.com;ntp.fizyka.umk.pl;time.apple.com;time.fu-berlin.de;time.facebook.com
#max number of requests to send at once
YA_WORLD_TIME_MAX_AT_ONCE=50 
#max number of servers to process
YA_WORLD_TIME_MAX_TOTAL=100 
#max request timeout in milliseconds, otherwise drop request
YA_WORLD_TIME_MAX_TIMEOUT=300 

Dependencies

~2MB
~31K SLoC