You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure you're using the correct integer type for holding the values you expect to handle, and to qualify any constants with appropriate integer suffixes.
Use unsigned long for play_time and it should work. For more correctness, also qualify the 1000 constant with UL:
On Fri, 13 Dec 2019 at 09:04, Michael Contreras ***@***.***> wrote:
Make sure you're using the correct integer type for holding the values you
expect to handle, and to qualify any constants with appropriate integer
suffixes <https://en.cppreference.com/w/c/language/integer_constant>.
Use *unsigned long* for *play_time* and it should work. For more
correctness, also qualify the *1000* constant with *UL*:
play_time_timer.in(play_time * 1000UL, CT_win);
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AAK4JWQTEUEJ53QVM2O22WDQYM62RA5CNFSM4JZ5M42KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGZHFEQ#issuecomment-565342866>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK4JWVCVSBFP5EVUSKKJ6DQYM62RANCNFSM4JZ5M42A>
.
Hi, i have to handle events that will occour in minutes (not milliseconds), but i noticed that using this code:
// in the global
auto play_time_timer = timer_create_default();
// in the setup
play_time_timer.in(play_time*1000, CT_win);
// in the loop
play_time_timer.tick();
// and the called procedure
bool CT_win(void *argument){
Serial.print("timer complete!");
return false;
}
works only if play_time if less than 33 seconds (so global delay less than 33000 milliseconds).
I suppose have to deal with the INT limit, but how i can make a minute counting timer?
The text was updated successfully, but these errors were encountered: