Relocate callback so there's only one of them.
@@ -47,7 +47,6 @@ namespace blit {
if (t->state == Timer::RUNNING){
if (time > (t->started + t->duration)) { // timer triggered
if(t->loops == -1){
- t->callback(*t);
t->started = time; // reset the start time correcting for any error
}
else
@@ -57,8 +56,8 @@ namespace blit {
if (t->loops == 0){
t->state = Timer::FINISHED;
}
- t->callback(*t);
}
+ t->callback(*t);
}
}
}
