… | |
… | |
248 | if (active) start (); |
248 | if (active) start (); |
249 | } |
249 | } |
250 | |
250 | |
251 | void start (const char *path, ev_tstamp interval = 0.) |
251 | void start (const char *path, ev_tstamp interval = 0.) |
252 | { |
252 | { |
|
|
253 | stop (); |
253 | set (path, interval); |
254 | set (path, interval); |
254 | start (); |
255 | start (); |
255 | } |
256 | } |
256 | |
257 | |
257 | void update () |
258 | void update () |
… | |
… | |
273 | void set () { } |
274 | void set () { } |
274 | EV_END_WATCHER (check, check) |
275 | EV_END_WATCHER (check, check) |
275 | |
276 | |
276 | #if EV_EMBED_ENABLE |
277 | #if EV_EMBED_ENABLE |
277 | EV_BEGIN_WATCHER (embed, embed) |
278 | EV_BEGIN_WATCHER (embed, embed) |
278 | void set (struct ev_loop *loop) |
|
|
279 | { |
|
|
280 | int active = is_active (); |
|
|
281 | if (active) stop (); |
|
|
282 | ev_embed_set (static_cast<ev_embed *>(this), loop); |
|
|
283 | if (active) start (); |
|
|
284 | } |
|
|
285 | |
|
|
286 | void start (struct ev_loop *embedded_loop) |
279 | void start (struct ev_loop *embedded_loop) |
287 | { |
280 | { |
288 | set (embedded_loop); |
281 | stop (); |
|
|
282 | ev_embed_set (static_cast<ev_embed *>(this), embedded_loop); |
289 | start (); |
283 | start (); |
290 | } |
284 | } |
291 | |
285 | |
292 | void sweep () |
286 | void sweep () |
293 | { |
287 | { |