Attached is a patch that fixes this test case, and passes all the others. Does anyone see anything wrong? If not, I'll commit it.
sam th On Wed, Dec 16, 2009 at 1:30 AM, John Clements <[email protected]> wrote: > > On Dec 15, 2009, at 6:01 PM, Doug Williams wrote: > >> The easiest thing to see immediately is that (date-nanosecond >> (current-date)) always returns a value smaller than 10,000,000, which is 100 >> times to small. Try the following which returns the minimum and maximum such >> values - it takes a while because of the random sleeps. >> >> (for/fold ((minimum +inf.0) >> (maximum -inf.0)) >> ((i (in-range 1000))) >> (let ((nanosecond (date-nanosecond (current-date)))) >> (sleep (/ (random) 10.0)) >> (values (min nanosecond minimum) (max nanosecond maximum)))) >> >> You'll get something like: >> >> 0.0 >> 9840000.0 > > Many thanks. I massaged this into this test case > > (check-within (let ([t (date-nanosecond (current-date))]) > (sleep 0.5) > (abs (- (date-nanosecond (current-date)) t))) > (* 1/2 (expt 10 9)) > (* 1/10 (expt 10 9))) > > ... which fails, as expected. > > John Clements > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > -- sam th [email protected]
srfi-patch
Description: Binary data
_________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-dev
