On Sat 05 Mar 2005, Wayne Davison wrote: > > I don't quite see the point of setting diff to 1ms if it's zero...
> Because an elapsed time of 0 means that any data that arrived, arrived > very quickly. Setting the rate to 0 when the elapsed time is 0 is the > opposite of what we need -- an infinite data rate. I like the idiom of > changing the elapsed time from 0 to 1 so that it divides safely into the > quantity of sent data, and thus gives us a non-0 rate (if any data was > actually sent). Yes, I get that, but the else branch of the if did a "diff ? bla /diff : 0" i.e. only using diff iff it's not zero, while the then branch went about it another way (i.e. setting diff to 1 if it was zero). I don't like inconsistencies like that in programs, esp. so close together... Doing the division only if diff is > 0 saves an assignment and a division in the case it was zero... Paul Slootman -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html