-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update references to time values to use chrono #14453
Conversation
References to time should use chrono values. Refactor tests in connectivity and drivers to remove depcrecation warninings due to not using chrono values.
@harmut01, thank you for your changes. |
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.
Need to revisit this, this is not the way to do it IMO, please refer to the events code for examples
@@ -73,14 +73,14 @@ void increment_multi_counter(void) | |||
void test_multi_ticker(void) | |||
{ | |||
LowPowerTicker ticker[TICKER_COUNT]; | |||
const uint32_t extra_wait = 10; // extra 10ms wait time | |||
std::chrono::milliseconds extra_wait = 10ms; // extra 10ms wait 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.
rather than poluting the code with std::chrono::milliseconds in this way you should look at the definition of 'duration' in the events code and do something similar
Remove microsecond macro for ticker time since ThisThread::sleep_for and TickerBase::attach accept any type of chrono value. Add macro for chrono value test assertion with and without tolerance.
@ARMmbed/mbed-os-core would anyone be able to pick this up as @harmut01 is no longer around to fix the failures in tests (tickers are failing, they should be related). |
Closing in favor of #14941 |
Summary of changes
References to time should use chrono values. Refactor tests in
connectivity and drivers to remove deprecation warnings due to not
using chrono values.
Impact of changes
None
Migration actions required
None
Documentation
None
Pull request type
Test results
Reviewers