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

[AMRAP-578] fix timer overflow #9

Merged
merged 1 commit into from
May 7, 2024

Conversation

kokosabu
Copy link
Contributor

@kokosabu kokosabu commented May 1, 2024

2バイトの整数型のため、0.5sをマイクロ秒で表現しようとするとオーバーフローしてしまい、意図した時間とならない。
また、今後より長い時間にする可能性もある。
よって、型を変更する。

Because of the 2-byte integer type, trying to express 0.5s in microseconds will result in an overflow and not the intended time.
There is also a possibility that a longer time may be used in the future.
Therefore, the type is changed.

@kokosabu kokosabu requested review from takurot and shujima May 1, 2024 14:42
@kokosabu kokosabu self-assigned this May 1, 2024
Copy link
Contributor

@takurot takurot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shujima
Copy link
Contributor

shujima commented May 7, 2024

型キャストでも済みそうですが、まあuint16_tにこだわる理由もないですしって感じですかね。
問題は無いように見えました。

@shujima shujima merged commit 5256c16 into main May 7, 2024
1 check passed
@kokosabu kokosabu deleted the bugfix/amrap-578-fix-timer-overflow branch May 7, 2024 03:25
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.

3 participants