Get timeseries data with timestamps

This commit is contained in:
emanuele-f 2019-01-31 16:31:37 +01:00
parent da07b294bd
commit fb3a0b8659
6 changed files with 57 additions and 10 deletions

View file

@ -194,6 +194,20 @@ end
-- ##############################################
function ts_common.serieWithTimestamp(serie, tstart, tstep)
local data = {}
local t = tstart
for i, pt in ipairs(serie) do
data[t] = pt
t = t + tstep
end
return data
end
-- ##############################################
local last_error = nil
local last_error_msg = nil
ts_common.ERR_OPERATION_TOO_SLOW = "OPERATION_TOO_SLOW"