[fluksod] allow individual sensor measurements to be flushed

This commit is contained in:
Bart Van Der Meerssche 2011-03-29 20:55:16 +02:00
parent 90bf363645
commit b0fd4c2753
1 changed files with 6 additions and 2 deletions

View File

@ -53,11 +53,15 @@ function add(M, meter, timestamp, value)
M[meter][timestamp] = value
end
function clear(M)
function clear(M, meter)
if meter then
M[meter] = nil
else -- clear all
for meter in pairs(M) do
M[meter] = nil
end
end
end
function filter(M, span, offset)
for meter, T in pairs(M) do