This file is indexed.

/usr/share/perl5/Games/PangZero/GameTimer.pm is in pangzero 1.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
##########################################################################
package Games::PangZero::GameTimer;
##########################################################################

use vars qw($FirstTick $LastTick $TotalAdvances $LastFpsTick $LastFps $Fps);

sub ResetTimer {
  $FirstTick      = SDL::get_ticks();
  $LastTick       = $LastFpsTick = $FirstTick;
  $TotalAdvances  = 0;
  $Fps            = $LastFps = 0;
}

sub GetAdvances {
  my ($ticks, $advance);

  $ticks          = SDL::get_ticks();
  $advance        = int(($ticks - $FirstTick) / 10) - $TotalAdvances;
  $TotalAdvances += $advance;
  
  # Calculate frames per second;
  ++$Fps if $advance > 0;
  if ($ticks - $LastFpsTick > 1000) {
    $LastFps     = $Fps;
    $LastFpsTick = $ticks;
    $Fps         = 0;
  }
  
  return $advance;
}

sub GetFramesPerSecond {
  return $LastFps;
}

1;