Merge pull request #6162 from maciejbocianski/sleep_manager_racecondition_test_fix

sleep_manager_racecondition test fix for devices with low CPU clock
pull/6182/head
Cruz Monrreal 2018-02-22 21:55:10 -06:00 committed by GitHub
commit 55f710f431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -67,12 +67,12 @@ void sleep_manager_irq_test()
Ticker ticker1;
Timer timer;
ticker1.attach_us(&sleep_manager_locking_irq_test, 500);
ticker1.attach_us(&sleep_manager_locking_irq_test, 1000);
// run this for 5 seconds
// run this for 10 seconds
timer.start();
int start = timer.read();
int end = start + 5;
int end = start + 10;
while (timer.read() < end) {
sleep_manager_locking_irq_test();
}