2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

fix: duplicated method

git-svn-id: https://svn.fhem.de/fhem/trunk@8708 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
hexenmeister 2015-06-07 12:44:53 +00:00
parent 3cbb496e0e
commit dc853c0570

View File

@ -4513,21 +4513,21 @@ sub SYSMON_ShowBarChartHtml($;$) {
}
sub SYSMON_secsToReadable($){
my $secs = shift;
my $y = floor($secs / 60/60/24/365);
my $d = floor($secs/60/60/24) % 365;
my $h = floor(($secs / 3600) % 24);
my $m = floor(($secs / 60) % 60);
my $s = $secs % 60;
my $string = '';
$string .= $y.'y ' if ($y > 0);
$string .= $d.'d ' if ($d > 0);
$string .= $h.'h ' if ($h > 0);
$string .= $m.'m ' if ($m > 0);
$string .= $s.'s' if ($s > 0);
return $string;
}
#sub SYSMON_secsToReadable($){
# my $secs = shift;
# my $y = floor($secs / 60/60/24/365);
# my $d = floor($secs/60/60/24) % 365;
# my $h = floor(($secs / 3600) % 24);
# my $m = floor(($secs / 60) % 60);
# my $s = $secs % 60;
# my $string = '';
# $string .= $y.'y ' if ($y > 0);
# $string .= $d.'d ' if ($d > 0);
# $string .= $h.'h ' if ($h > 0);
# $string .= $m.'m ' if ($m > 0);
# $string .= $s.'s' if ($s > 0);
# return $string;
#}
# --- SNX ---------------------------------------------------------------------