count = {
let ts = now
if (!chain.last) chain.last = ts
let m = moment(ts)
let dt = ""
if (ts-chain.last > settings.time_resolution){
if (chain.lastdata != data) {
dt = data
index_time(chain.blocks.length, m, dt)
}
let b = crypto_js.SHA256(""+chain.blocks[chain.blocks.length-1].hash+ts+dt).toString()
mutable time = m.format()
mutable space = [position.coords.longitude,
position.coords.latitude
]
chain.blocks.push({hash: b, ts: ts})
chain.last= ts
chain.lastdata = data
}
}