Comment 2 for bug 426569

Revision history for this message
Derick Eddington (derick-eddington) wrote :

Yeah, the tests make me sure it's intended to support negative durations. The tests never using negative nanoseconds and that abs make me wonder if the author was thinking to make it like R6RS div-and-mod but forgot to adjust the quotient part. tm:nanoseconds->values is obviously giving incorrect results because they don't equal the input value. I'm going to fix it by using div-and-mod to keep the nanoseconds field non-negative, as that abs suggests might have been the intent, just in case somewhere else assumes the nanoseconds field is non-negative. Thanks for the new tests and for reporting this.