Browse Source

handle time on linux

master 0.0.1
Zane C. B-H 1 year ago
parent
commit
256af82bbc
3 changed files with 13 additions and 5 deletions
  1. +4
    -0
      Proc-ProcessTable-Match/Changes
  2. +2
    -2
      Proc-ProcessTable-Match/lib/Proc/ProcessTable/Match.pm
  3. +7
    -3
      Proc-ProcessTable-Match/lib/Proc/ProcessTable/Match/Time.pm

+ 4
- 0
Proc-ProcessTable-Match/Changes View File

@ -1,5 +1,9 @@
Revision history for Proc-ProcessTable-Match
0.0.1 2019-08-26/20:45
- Handle time properly on linux now
by converting it to seconds.
0.0.0 2019-08-25/06:00
- Initial release.

+ 2
- 2
Proc-ProcessTable-Match/lib/Proc/ProcessTable/Match.pm View File

@ -10,11 +10,11 @@ Proc::ProcessTable::Match - Matches a Proc::ProcessTable::Process against a stac
=head1 VERSION
Version 0.0.0
Version 0.0.1
=cut
our $VERSION = '0.0.0';
our $VERSION = '0.0.1';
=head1 SYNOPSIS


+ 7
- 3
Proc-ProcessTable-Match/lib/Proc/ProcessTable/Match/Time.pm View File

@ -10,11 +10,11 @@ Proc::ProcessTable::Match::Time - Check if the user + system time of a process m
=head1 VERSION
Version 0.0.0
Version 0.0.1
=cut
our $VERSION = '0.0.0';
our $VERSION = '0.0.1';
=head1 SYNOPSIS
@ -41,7 +41,7 @@ our $VERSION = '0.0.0';
This intiates the object.
It takes a hash reference with one key. One key is required and
that is 'times', which is a array of time values to match.
that is 'times', which is a array of time values in seconds to match.
The Time values can be prefixed with the equalities below for doing
additional comparisons.
@ -129,6 +129,10 @@ sub match{
return 0;
}
if ( $^O =~ /^linux$/ ){
$proc_time=$proc_time/1000000;
}
# use while as foreach will reference the value
my $time_int=0;
while (defined( $self->{times}[$time_int] )){


Loading…
Cancel
Save