Is sampler clock inconsistent with hardware.millis()?

I’m seeing about a 1% disagreement. I’m running a sampler at 100Hz with nothing too exciting happening in the callback, and comparing a count of callbacks with hardware.millis().

Is this my bug or your feature? Is there an easy way to know exactly when a sample came in if these clocks disagree? (Not needed for my application but now I’m curious)

Also, and I apologize if this is solved elsewhere and I’m not connecting the dots, the following code sometimes reveals a changing (typically growing) difference between clock() and hardware.millis():

`imp.configure(“TimingTester”, [], []);

// this may have reduced, but not eliminated, the drift

function Update(){
server.log(format(“Time: %d _____ Millis: %d ______ Clock: %f _____Diff: %f”, time(), hardware.millis(), clock(), clock()*1000-hardware.millis()))


I had a problem of much more than 1%, I think about 20%.
imp.enableblinkup(true) solved it.
There are a few threads here describing the issue.
I have written code to provide the correct time within 10ms of NTP.