Skip to content
Snippets Groups Projects
Commit f1251d66 authored by Ferdinand Bachmann's avatar Ferdinand Bachmann Committed by rahix
Browse files

feat(rtc): Add monotonic clock

Squashed commits:

e94f7bf9 epicardium/rtc: add monotonic time
e0691c6d pycardium/modules/utime.c: add bindings for monotonic time
756c13df epicardium/rtc: fix numerically unstable subsecond decoding

         the subsecond encoding function from epic_rtc_set_milliseconds
         and the corresponding decoding function from
         epic_rtc_get_milliseconds are not numerically stable.

         i.e., encoding 5 milliseconds to 20 subsecs and immediately
         afterwards decoding that yields 4 milliseconds.

         Adding a bias of 999 (0.24 milliseconds) to the decoding
         function makes it numerically stable, while never decoding any
         subsecond value to more than 999 milliseconds.

e99e278b epicardium/rtc: only poll time once for calculating monotonic_offset
18936b7e pycardium/modules/utime.c: run clang-format
869ac617 epicardium/rtc: add explanation comment for numerically stable subsecond decode
parent 5773e2e1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment