<div dir="ltr"><div>Cheers all,</div><div><br></div><div>  Just as a heads-up to driver maintainers (and future authors): with the recent merge</div><div>of <a href="https://github.com/networkupstools/nut/pull/2010">https://github.com/networkupstools/nut/pull/2010</a> we now support timestamps for</div><div>the state-tree entries (and a couple of methods to compare them). Precision depends</div><div>on build circumstances (ideally monotonic timespec with nanosecond values, else</div><div>plain timeval which may be confused by NTP, summer/winter times for non-UTC hosts,</div><div>etc.)</div><div><br></div><div>  Currently the only practical use for this feature was in the same PR to fix `apcupsd-ups` -<br></div><div>so it no longer wipes known info BEFORE querying the device/server, but can wipe any</div><div>obsolete entries AFTER such query if their timestamps did not get updated.</div><div><br></div><div>  I suppose such an approach can be extended to many other drivers or even the whole</div><div>framework (e.g. in the `main.c` loop), although some care should be taken for e.g. "full"</div><div>vs. "partial" updates like in `snmp-ups` driver which does not expect newest data points</div><div>for *everything* after *every* loop cycle. Surely, special handling is also in order for fields</div><div>marked as (semi-)static, overrides, immutables, etc.<br></div><div><br></div><div>  In any case, such refactoring would be a future and separate endeavour, although</div><div>people are welcome to get on with it and propose PRs :)</div><div><br></div><div>Jim Klimov</div><div><br></div></div>