On Mon, Dec 08, 2025 at 08:22:12AM +0100, Stefano Brivio wrote: > On Mon, 8 Dec 2025 16:41:21 +1100 > David Gibson wrote: > > > On Mon, Dec 08, 2025 at 01:22:11AM +0100, Stefano Brivio wrote: [snip] > > > - flow_dbg(conn, "timer expires in %llu.%03llus", > > > - (unsigned long long)it.it_value.tv_sec, > > > - (unsigned long long)it.it_value.tv_nsec / 1000 / 1000); > > > + if (conn->flags & ACK_TO_TAP_DUE) { > > > + flow_trace(conn, "timer expires in %lu.%01llums", > > > + (unsigned long)it.it_value.tv_nsec / 1000 / 1000, > > > + (unsigned long long)it.it_value.tv_nsec / 1000); > > > > This doesn't look right - you need a % to exclude the whole > > milliseconds here for the fractional part. > > Ah, oops, right, and on top of that this can be more than one second > but I forgot to add it. Fixed in v3. > > > Plus, it looks like this > > is trying to compute microseconds, which would be 3 digits after the > > . in ms, but the format string accomodates only one. > > That was intended, I wanted to show only the first digit of > microseconds given that the smallest values are hundreds of > microseconds, but changed anyway given the possible confusion. One digit is fine, but then you need tv_nsec / 100000, rather than nsec / 1000. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson