-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Unexpected time module behavior? #2077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks that makes sense. So then it is probably a coincidence that for my PyPortal the time.monotonic() seems to keep almost perfect time with respect to the atomic clock and time.time() runs quite fast. |
The SAMD51 chip has a bug: the main clock that we're using (DFLL48M) cannot be locked to the crystal oscillator on the board. So the accuracy you're seeing is probably accidental. |
I re-tested this one on 6.0. It looks like perhaps it can be closed. Here are the results on various platforms: SAMD51 NRF52840 ESP32S2 |
Thanks @DavePutz! I agree it can be closed. Both monotonic and time use the RTC now. |
The following seems to suggest that the time.time() function passes time faster than time.monotonic
On 4.x I get:
starting 300s wait
Mono elasped 299.999504
Clock elasped 306
the "error" is around ~5s in 5 min, ~10s in 10min etc
for this code, I would have expected them to return the same duration. Is that correct?
The text was updated successfully, but these errors were encountered: