<div dir="ltr"><div>Hi Ross,</div><div> </div><div>There is a problem with this line when "nextQOSMeasurementUSecs" < "timeNowUSecs", or in other words when "timeNowUSecs" has been acquired at a time after the time stored in "nextQOSMeasurementUSecs". This happened for me only while single stepping the code in the debugger and thus letting pass several seconds between the "gettimeofday" calls, but I guess that could also happen under high system load, etc.</div>
<div> </div><div>The effect is that the periodic QOS measurement practically "stops" working because a very high value for "microseconds" will get passed to "scheduleDelayedTask". When "usecsToDelay" gets negative due to above mentioned condition, the "uint usecsToDelay" gets populated to the "int64_t microseconds" parameter of "scheduleDelayedTask" without sign extension (which is correct) and thus a very large delay is accounted for that task - means in practice that it sort of stops working.</div>
<div> </div><div>I fixed this with changing</div><div> "unsigned usecsToDelay"</div><div>to</div><div> "int usecsToDelay"</div><div> </div><div>Kind regards.</div></div>