Skip to content
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

Allow identity mapping between os_time_t and microsoconds. #983

Open
terrillmoore opened this issue Nov 19, 2024 · 0 comments
Open

Allow identity mapping between os_time_t and microsoconds. #983

terrillmoore opened this issue Nov 19, 2024 · 0 comments
Assignees

Comments

@terrillmoore
Copy link
Member

The inexact relationship between os_time_t and Arduino micros() is often maddening and wasteful.

A code review suggests that we could change code pretty simply to allow os_time_t to be microseconds on platforms where that's convenient. It's just a matter of finding all the places where the code scales by US_PER_OSTICK_EXPONENT and related values, and make sure things work when it's set to 0.

This would reduce the dynamic range of os_time_t from 19 hours to 1 hour. We'd need to review whether the LMIC needs to deal with times longer than 1 hour internally. This might affect sketches that use os_time_t for long term scheduling (by submitting an LMIC job).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant