mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
"fhemuptime" improvement
git-svn-id: https://svn.fhem.de/fhem/trunk@6168 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ef2c4e5c88
commit
ee4be3246f
@ -111,7 +111,7 @@ SYSMON_Define($$)
|
||||
|
||||
$hash->{STATE} = "Initialized";
|
||||
|
||||
$hash->{DEF_TIME} = time() unless defined($hash->{DEF_TIME});
|
||||
#$hash->{DEF_TIME} = time() unless defined($hash->{DEF_TIME});
|
||||
|
||||
SYSMON_updateCurrentReadingsMap($hash);
|
||||
|
||||
@ -861,8 +861,10 @@ SYSMON_getFHEMUptime($$)
|
||||
{
|
||||
my ($hash, $map) = @_;
|
||||
|
||||
if(defined ($hash->{DEF_TIME})) {
|
||||
my $fhemuptime = time()-$hash->{DEF_TIME};
|
||||
#if(defined ($hash->{DEF_TIME})) {
|
||||
if(defined($fhem_started)) {
|
||||
#my $fhemuptime = time()-$hash->{DEF_TIME};
|
||||
my $fhemuptime = time()-$fhem_started;
|
||||
$map->{+FHEMUPTIME} = sprintf("%d",$fhemuptime);
|
||||
$map->{+FHEMUPTIME_TEXT} = sprintf("%d days, %02d hours, %02d minutes",SYSMON_decode_time_diff($fhemuptime));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user