| 36 | } |
| 37 | |
| 38 | NodeStatus TestNode::onStart() |
| 39 | { |
| 40 | if(_config->async_delay <= std::chrono::milliseconds(0)) |
| 41 | { |
| 42 | return onCompleted(); |
| 43 | } |
| 44 | // convert this in an asynchronous operation. Use another thread to count |
| 45 | // a certain amount of time. |
| 46 | _completed = false; |
| 47 | _timer.add(std::chrono::milliseconds(_config->async_delay), [this](bool aborted) { |
| 48 | if(!aborted) |
| 49 | { |
| 50 | _completed.store(true); |
| 51 | this->emitWakeUpSignal(); |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | _completed.store(false); |
| 56 | } |
| 57 | }); |
| 58 | return NodeStatus::RUNNING; |
| 59 | } |
| 60 | |
| 61 | NodeStatus TestNode::onRunning() |
| 62 | { |
nothing calls this directly
no test coverage detected