-
Notifications
You must be signed in to change notification settings - Fork 3k
Make poll() use RTOS tick count #6698
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
Conversation
@amq - should still work for you, I hope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
platform/mbed_poll.cpp
Outdated
if (timeout > 0) { | ||
start_time = Kernel::get_ms_count(); | ||
} | ||
#define time_elapsed() int64_t(Kernel::get_ms_count() - start_time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should this be in all-caps as a macro?
RTOS maintains a tick count - use it, avoiding issues with sleep and low power timers.
@geky leave approve/request changes please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I thought I did approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I did, it was dismissed by an update. I understand now.
/morph build |
Build : SUCCESSBuild number : 1853 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 1497 |
/morph export-build |
Test : SUCCESSBuild number : 1661 |
Exporter Build : SUCCESSBuild number : 1500 |
Description
RTOS maintains a tick count - use it, avoiding issues with sleep and low power timers.
This follows on from similar changes in #6653 and #6693
Supersedes #6418 for RTOS builds.
Pull request type
[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change