line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
51493
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
115
|
|
2
|
|
|
|
|
|
|
package Event::Stats; |
3
|
4
|
|
|
4
|
|
14
|
use Carp; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
196
|
|
4
|
4
|
|
|
4
|
|
14
|
use Event 0.53; |
|
4
|
|
|
|
|
57
|
|
|
4
|
|
|
|
|
18
|
|
5
|
4
|
|
|
4
|
|
268
|
use base ('Exporter', 'DynaLoader'); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
723
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.02'; |
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw(round_seconds idle_time total_time); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->bootstrap($VERSION); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub enforce_max_callback_time { |
12
|
|
|
|
|
|
|
# a bit kludged |
13
|
1
|
50
|
|
1
|
1
|
1097
|
if (@_) { |
14
|
1
|
|
|
|
|
2
|
my ($yes) = @_; |
15
|
1
|
50
|
|
1
|
|
17
|
$SIG{ALRM} = sub { Carp::confess("Event timed out") } if $yes; |
|
1
|
|
|
|
|
3595686
|
|
16
|
1
|
|
|
|
|
13
|
_enforce_max_callback_time($yes); |
17
|
|
|
|
|
|
|
} else { |
18
|
0
|
|
|
|
|
|
_enforcing_max_callback_time() |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |