… | |
… | |
517 | { |
517 | { |
518 | Signal signum = sv_signum (signal); /* may croak here */ |
518 | Signal signum = sv_signum (signal); /* may croak here */ |
519 | int active = w->active; |
519 | int active = w->active; |
520 | |
520 | |
521 | if (active) ev_signal_stop (w); |
521 | if (active) ev_signal_stop (w); |
|
|
522 | |
522 | ev_signal_set (w, signum); |
523 | ev_signal_set (w, signum); |
|
|
524 | |
523 | if (active) ev_signal_start (w); |
525 | if (active) ev_signal_start (w); |
524 | } |
526 | } |
|
|
527 | |
|
|
528 | int signal (struct ev_signal *w, SV *new_signal = 0) |
|
|
529 | CODE: |
|
|
530 | { |
|
|
531 | Signal signum = new_signal ? sv_signum (signal) : 0; /* may croak here */ |
|
|
532 | RETVAL = w->signum; |
|
|
533 | |
|
|
534 | if (items > 1) |
|
|
535 | { |
|
|
536 | int active = w->active; |
|
|
537 | if (active) ev_signal_stop (w); |
|
|
538 | |
|
|
539 | ev_signal_set (w, signum); |
|
|
540 | |
|
|
541 | if (active) ev_signal_start (w); |
|
|
542 | } |
|
|
543 | } |
|
|
544 | OUTPUT: |
|
|
545 | RETVAL |
525 | |
546 | |
526 | MODULE = EV PACKAGE = EV::Time |
547 | MODULE = EV PACKAGE = EV::Time |
527 | |
548 | |
528 | MODULE = EV PACKAGE = EV::Timer PREFIX = ev_timer_ |
549 | MODULE = EV PACKAGE = EV::Timer PREFIX = ev_timer_ |
529 | |
550 | |
… | |
… | |
571 | CHECK_REPEAT (interval); |
592 | CHECK_REPEAT (interval); |
572 | CODE: |
593 | CODE: |
573 | { |
594 | { |
574 | int active = w->active; |
595 | int active = w->active; |
575 | if (active) ev_periodic_stop (w); |
596 | if (active) ev_periodic_stop (w); |
|
|
597 | |
576 | ev_periodic_set (w, at, interval); |
598 | ev_periodic_set (w, at, interval); |
|
|
599 | |
577 | if (active) ev_periodic_start (w); |
600 | if (active) ev_periodic_start (w); |
578 | } |
601 | } |
579 | |
602 | |
580 | MODULE = EV PACKAGE = EV::Idle PREFIX = ev_idle_ |
603 | MODULE = EV PACKAGE = EV::Idle PREFIX = ev_idle_ |
581 | |
604 | |
… | |
… | |
624 | void set (struct ev_child *w, int pid) |
647 | void set (struct ev_child *w, int pid) |
625 | CODE: |
648 | CODE: |
626 | { |
649 | { |
627 | int active = w->active; |
650 | int active = w->active; |
628 | if (active) ev_child_stop (w); |
651 | if (active) ev_child_stop (w); |
|
|
652 | |
629 | ev_child_set (w, pid); |
653 | ev_child_set (w, pid); |
|
|
654 | |
630 | if (active) ev_child_start (w); |
655 | if (active) ev_child_start (w); |
631 | } |
656 | } |
|
|
657 | |
|
|
658 | int pid (struct ev_child *w, int new_pid = 0) |
|
|
659 | CODE: |
|
|
660 | { |
|
|
661 | RETVAL = newSVsv (w->pid); |
|
|
662 | |
|
|
663 | if (items > 1) |
|
|
664 | { |
|
|
665 | int active = w->active; |
|
|
666 | if (active) ev_child_stop (w); |
|
|
667 | |
|
|
668 | ev_child_set (w, new_pid); |
|
|
669 | |
|
|
670 | if (active) ev_child_start (w); |
|
|
671 | } |
|
|
672 | } |
|
|
673 | OUTPUT: |
|
|
674 | RETVAL |
|
|
675 | |
632 | |
676 | |
633 | int status (struct ev_child *w) |
677 | int status (struct ev_child *w) |
634 | CODE: |
678 | CODE: |
635 | RETVAL = w->status; |
679 | RETVAL = w->status; |
636 | OUTPUT: |
680 | OUTPUT: |