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){
25
25
_cached_next_run = last_run + interval;
26
26
}
27
27
28
- Thread Thread::setInterval (long _interval){
28
+ void Thread::setInterval (long _interval){
29
29
// Filter intervals less than 0
30
30
interval = (_interval < 0 ? 0 : _interval);
31
31
32
32
// Cache the next run based on the last_run
33
33
_cached_next_run = last_run + interval;
34
-
35
- // Return self object
36
- return *this ;
37
34
}
38
35
39
36
bool Thread::shouldRun (long time){
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class Thread{
40
40
Thread (void (*callback)(void ) = NULL , long _interval = 0 );
41
41
42
42
// Set the desired interval for calls, and update _cached_next_run
43
- virtual Thread setInterval (long _interval);
43
+ virtual void setInterval (long _interval);
44
44
45
45
// Return if the Thread should be runned or not
46
46
virtual bool shouldRun (long time = -1 );
You can’t perform that action at this time.
0 commit comments