… | |
… | |
399 | } |
399 | } |
400 | |
400 | |
401 | =item cf::periodic $interval, $cb |
401 | =item cf::periodic $interval, $cb |
402 | |
402 | |
403 | Like EV::periodic, but randomly selects a starting point so that the actions |
403 | Like EV::periodic, but randomly selects a starting point so that the actions |
404 | get spread over timer. |
404 | get spread over time. |
405 | |
405 | |
406 | =cut |
406 | =cut |
407 | |
407 | |
408 | sub periodic($$) { |
408 | sub periodic($$) { |
409 | my ($interval, $cb) = @_; |
409 | my ($interval, $cb) = @_; |
… | |
… | |
587 | reset_signals; |
587 | reset_signals; |
588 | &$cb |
588 | &$cb |
589 | }, @args; |
589 | }, @args; |
590 | |
590 | |
591 | wantarray ? @res : $res[-1] |
591 | wantarray ? @res : $res[-1] |
|
|
592 | } |
|
|
593 | |
|
|
594 | sub objinfo { |
|
|
595 | ( |
|
|
596 | "counter value" => cf::object::object_count, |
|
|
597 | "objects created" => cf::object::create_count, |
|
|
598 | "objects destroyed" => cf::object::destroy_count, |
|
|
599 | "freelist size" => cf::object::free_count, |
|
|
600 | "allocated objects" => cf::object::objects_size, |
|
|
601 | "active objects" => cf::object::actives_size, |
|
|
602 | ) |
592 | } |
603 | } |
593 | |
604 | |
594 | =item $coin = coin_from_name $name |
605 | =item $coin = coin_from_name $name |
595 | |
606 | |
596 | =cut |
607 | =cut |