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

Timer can fire prematurely due to resolution differences. #31

Open
dpc opened this issue Aug 27, 2015 · 0 comments
Open

Timer can fire prematurely due to resolution differences. #31

dpc opened this issue Aug 27, 2015 · 0 comments
Milestone

Comments

@dpc
Copy link
Owner

dpc commented Aug 27, 2015

SteadyTime keeps time in nanoseconds, while mio uses delay in ms. If duration between now and timeout time is rounded down when converting to ms, the timer can fire while the precise now is not yet bigger than timeout time. This is not fatal, as the timer will just generate next mio timeout_ms(0), but it's not optimal.

I guess rounding time up when converting to ms is a proper fix.

@dpc dpc changed the title It seem Timer can fire prematurely due to resultion differences. It seem Timer can fire prematurely due to resulution differences. Aug 27, 2015
@dpc dpc changed the title It seem Timer can fire prematurely due to resulution differences. It seem Timer can fire prematurely due to resolution differences. Aug 27, 2015
@dpc dpc changed the title It seem Timer can fire prematurely due to resolution differences. Timer can fire prematurely due to resolution differences. Aug 31, 2015
@dpc dpc modified the milestone: 0.3 Dec 10, 2015
@dpc dpc added the easy pick label Jan 22, 2016
@dpc dpc added blocked and removed blocked labels Mar 13, 2016
dpc added a commit that referenced this issue Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant