2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-03 07:35:22 +00:00

fhem.pl: add ReadingsAge (Forum #50783)

git-svn-id: https://svn.fhem.de/fhem/trunk@11065 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-03-13 20:05:32 +00:00
parent bd59852c1b
commit c2473229e5

View File

@ -3708,6 +3708,13 @@ ReadingsTimestamp($$$)
return $default;
}
sub
ReadingsAge($$$)
{
my ($device,$reading,$default) = @_;
return time() - time_str2num(ReadingsTimestamp($device,$reading,$default));
}
sub
Value($)
{