It uses filter for serviceData, also maybe with setScan you get the packet with time sooner just when it arrives so that timestamp inside is more fresh? Was thinking to suggest requestDevice at first too but then was thinking setScan with filter may be better.
Also if you get more packets (from one or more devices) then you have more data to adjust the time.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It uses filter for serviceData, also maybe with setScan you get the packet with time sooner just when it arrives so that timestamp inside is more fresh? Was thinking to suggest requestDevice at first too but then was thinking setScan with filter may be better.
Also if you get more packets (from one or more devices) then you have more data to adjust the time.