adafruit / Adafruit_CircuitPython_NTP

Network Time Protocol (NTP) Helper for CircuitPython
MIT License
9 stars 18 forks source link

refactor to extract ntp update logic #39

Closed mMerlin closed 1 month ago

mMerlin commented 1 month ago

Extract the ntp lookup logic to a separate method. change to use integer nanoseconds for the monotonic start reference.

Add utc_ns property to return the raw nanoseconds since the unix epoch. For cases were more precision than ±1 second is wanted.

mMerlin commented 1 month ago

It seems that black does not like where I did or did not wrap lines. Should I edit to match and re-push?

mMerlin commented 1 month ago

setup local precommit to adjust formatting. updated 2 of the examples to use settings.toml instead of secrets.py.