[Cake] Choosing a tin to work on

George Amanakis g_amanakis at yahoo.com
Wed Apr 12 09:45:14 EDT 2017


>The last value less than or equal to zero will always win as best_tin.
>If all tdiff values are positive then best_time will end up as the lowest value however.
I agree with xnoreq. The algorithm as it is will not always return the least overdue tin. It returns either the lowest positive tdiff (if all tdiff values are positive), or the lowest negative one (if not all tdiff values are positive). This could be accomplished just with "if (tdiff<=best_time)" as xnoreq pointed out.
George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20170412/90f2a1da/attachment.html>


More information about the Cake mailing list