diff options
| author | Finomnis <Finomnis@users.noreply.github.com> | 2023-12-06 19:36:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 18:36:09 +0000 |
| commit | bbed94528528fbfe53ed7baf9cc38ca012785d13 (patch) | |
| tree | 45269ff41ff0007e2b405c5cbea2c3ba19928b46 /rtic-time/tests | |
| parent | f377471e440d8be0b2f9e9c8877ed015f62dc19e (diff) | |
Fix race condition in `calculate_now` (#860)
* Fix race condition in calculate_now
* Add changelog
* Update changelog
* Refine comment
* More comment fixes
Diffstat (limited to 'rtic-time/tests')
| -rw-r--r-- | rtic-time/tests/half_period_time_counter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rtic-time/tests/half_period_time_counter.rs b/rtic-time/tests/half_period_time_counter.rs index ceffbea..ee501b4 100644 --- a/rtic-time/tests/half_period_time_counter.rs +++ b/rtic-time/tests/half_period_time_counter.rs @@ -5,7 +5,7 @@ macro_rules! do_test_u8 { let periods: u32 = $periods; let counter: u8 = $counter; let expected: u32 = $expected; - let actual: u32 = calculate_now(periods, || counter); + let actual: u32 = calculate_now(|| periods, || counter); assert_eq!( actual, expected, "Expected: ({} | {}) => {}, got: {}", @@ -19,7 +19,7 @@ macro_rules! do_test_u16 { let periods: u16 = $periods; let counter: u16 = $counter; let expected: u32 = $expected; - let actual: u32 = calculate_now(periods, || counter); + let actual: u32 = calculate_now(|| periods, || counter); assert_eq!( actual, expected, "Expected: ({} | {}) => {}, got: {}", |
