File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,12 @@ void Thread::runned(long time){
2525 _cached_next_run = last_run + interval;
2626}
2727
28- Thread Thread::setInterval (long _interval){
28+ void Thread::setInterval (long _interval){
2929 // Filter intervals less than 0
3030 interval = (_interval < 0 ? 0 : _interval);
3131
3232 // Cache the next run based on the last_run
3333 _cached_next_run = last_run + interval;
34-
35- // Return self object
36- return *this ;
3734}
3835
3936bool Thread::shouldRun (long time){
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class Thread{
4040 Thread (void (*callback)(void ) = NULL , long _interval = 0 );
4141
4242 // Set the desired interval for calls, and update _cached_next_run
43- virtual Thread setInterval (long _interval);
43+ virtual void setInterval (long _interval);
4444
4545 // Return if the Thread should be runned or not
4646 virtual bool shouldRun (long time = -1 );
You can’t perform that action at this time.
0 commit comments