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

Native hwtimer fix #547

Merged
merged 3 commits into from
Jan 24, 2014
Merged

Conversation

LudwigKnuepfer
Copy link
Member

With master, test_hwtimer shows the delays are relative to the previous timers, not relative to the point in time they were set (i.e. longer delays). This misbehavior changes with this PR.

The 'overdue mitigation' fix is visible in test_vtimer_msg. Without it, the output shows that the 5 second timeout is scheduled along with the 2 second timeout continuously:

now=6:606 -> every 2.0s: Hello World
timer_thread: set timer successfully
now=6:644 -> every 5.0s: This is a Test
timer_thread: set timer successfully
sec=6 min=0 hour=0
sec=7 min=0 hour=0
now=8:694 -> every 2.0s: Hello World
timer_thread: set timer successfully
now=8:731 -> every 5.0s: This is a Test
timer_thread: set timer successfully
sec=8 min=0 hour=0
sec=9 min=0 hour=0

This was due to a bad hack when handling an overdue timer.
The test output with this PR looks like one would expect:

sec=1 min=0 hour=0
now=2:431 -> every 2.0s: Hello World
timer_thread: set timer successfully
sec=2 min=0 hour=0
sec=3 min=0 hour=0
now=4:516 -> every 2.0s: Hello World
timer_thread: set timer successfully
sec=4 min=0 hour=0
now=5:480 -> every 5.0s: This is a Test
timer_thread: set timer successfully
sec=5 min=0 hour=0
now=6:600 -> every 2.0s: Hello World
timer_thread: set timer successfully
sec=6 min=0 hour=0
sec=7 min=0 hour=0
now=8:698 -> every 2.0s: Hello World
timer_thread: set timer successfully
sec=8 min=0 hour=0
sec=9 min=0 hour=0
now=10:557 -> every 5.0s: This is a Test
timer_thread: set timer successfully
now=10:626 -> every 2.0s: Hello World
timer_thread: set timer successfully
sec=10 min=0 hour=0
sec=11 min=0 hour=0

@ghost ghost assigned OlegHahm Jan 23, 2014
@OlegHahm
Copy link
Member

ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants