| 143 | } |
| 144 | |
| 145 | void Timer::start(double p_time) { |
| 146 | ERR_FAIL_COND_MSG(!is_inside_tree(), "Unable to start the timer because it's not inside the scene tree. Either add it or set autostart to true."); |
| 147 | |
| 148 | if (p_time > 0) { |
| 149 | set_wait_time(p_time); |
| 150 | } |
| 151 | time_left = wait_time; |
| 152 | _set_process(true); |
| 153 | } |
| 154 | |
| 155 | void Timer::stop() { |
| 156 | time_left = -1; |
no outgoing calls
no test coverage detected