Probe::MachineInfo::ClockSpeed - Clock Speed


Probe-MachineInfo documentation Contained in the Probe-MachineInfo distribution.

Index


Code Index:

NAME

Top

Probe::MachineInfo::ClockSpeed - Clock Speed

SYNOPSIS

Top

blah

DESCRIPTION

Top

blah

PUBLIC INTERFACE

Top

get

 get()

Uses Unix::Processors to return the number of processors on the machine. If possible it returns undef.

units

 units()

mins

AUTHOR

Top

Sagar R. Shah


Probe-MachineInfo documentation Contained in the Probe-MachineInfo distribution.
package Probe::MachineInfo::ClockSpeed;


# pragmata
use base qw(Probe::MachineInfo::Metric);
use strict;
use warnings;


# Standard Perl Library and CPAN modules
use English;
use Unix::Processors;

#
# CLASS ATTRIBUTES
#

#
# CONSTRUCTOR
#


sub get {
	my ($self) = @_;

	my $proc = Unix::Processors->new();
	my $speed;
	eval {
		$speed = $proc->max_clock();
	};
	return $speed;
}

sub units {
	my ($self) = @_;

	return "MHz";
}

1;