$SIG{INTERUPT_ON_PENDING_SOCKET_IO} = \&ckSockets;
####
use IO::Select;
...
# Check for and process any pending socket input
# avoid steping on toes by keeping running list of ready
# sockets and process it untill empty
sub ckSockets { # Returns: # of ready so we can tell activity
...
my @breadys = $io_select_obj->can_read(0);
foreach my $fd_key (@breadys) {
...read and process data from this socket...
}
####
[root@ibm-blade-blade0 testbuddy]# time dprofpp
Total Elapsed Time = 1790.060 Seconds
User+System Time = 1315.990 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
55.9 736.8 753.00 317833 0.0002 0.0002 IO::Select::can_read
9.05 119.1 256.27 363021 0.0000 0.0001 BuddyUsers::log
5.25 69.14 137.12 350999 0.0000 0.0000 tsprint::ts
5.17 67.97 67.979 350999 0.0000 0.0000 POSIX::strftime