On latency in the internet of things