Skip to content

delay () for Due doesn't handle 32-bit wrap-around. #1736

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

Closed
MarkTillotson opened this issue Dec 13, 2013 · 1 comment
Closed

delay () for Due doesn't handle 32-bit wrap-around. #1736

MarkTillotson opened this issue Dec 13, 2013 · 1 comment
Milestone

Comments

@MarkTillotson
Copy link

In 1.5.4, 1.5.5

See http://forum.arduino.cc/index.php?topic=204081.0

The existing delay() implementation uses an unsigned comparison between GetTickCount() and a target timestamp,
rather than correctly comparing a timestamp difference to
an interval.

The existing code could (in admittedly rare circumstances) simply hang forever (should the variable end happen to be zero).

@cmaglie
Copy link
Member

cmaglie commented Dec 13, 2013

Fixed. Thank you!

C

@cmaglie cmaglie closed this as completed Dec 13, 2013
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
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

No branches or pull requests

2 participants