line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SDLx::FPS; |
2
|
2
|
|
|
2
|
|
1056
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
61
|
|
3
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
34
|
|
4
|
2
|
|
|
2
|
|
246
|
use SDL::GFX::Framerate; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
5
|
2
|
|
|
2
|
|
262
|
use SDL::GFX::FPSManager; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
114
|
|
6
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
349
|
|
7
|
|
|
|
|
|
|
our @ISA = qw(SDL::GFX::FPSManager); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
1
|
547
|
my ( $class, %args ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
|
|
9
|
for ( grep { $_ ne 'fps' } keys %args ) { |
|
1
|
|
|
|
|
4
|
|
13
|
0
|
|
|
|
|
0
|
Carp::cluck("Unrecognized constructor hash key: $_"); |
14
|
|
|
|
|
|
|
} |
15
|
2
|
|
|
|
|
29
|
my $fps = $class->SDL::GFX::FPSManager::new( 0, 0, 0, 0 ); |
16
|
2
|
|
|
|
|
14
|
SDL::GFX::Framerate::init( $fps ); |
17
|
2
|
100
|
|
|
|
11
|
$fps->set( $args{fps} ) if defined $args{fps}; |
18
|
2
|
|
|
|
|
5
|
$fps; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub set { |
22
|
2
|
|
|
2
|
1
|
632
|
SDL::GFX::Framerate::set( @_[ 0, 1 ] ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub get { |
26
|
3
|
|
|
3
|
1
|
237
|
SDL::GFX::Framerate::get( $_[0] ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub delay { |
30
|
11
|
|
|
11
|
1
|
1997439
|
SDL::GFX::Framerate::delay( $_[0] ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |