On Wed, Jul 21, 2010 at 2:40 AM, Caspar Zhang <[email protected]> wrote: > > ----- "Garrett Cooper" <[email protected]> wrote: > >> ACK (and thanks for the hard work)! >> -Garrett > > Hi Garrett, I tested my patch yesterday but the result > is not so good. After 1000 times running, the fix: > > + /* do a rounding */ > + real_sec = (int)(0.5 + (tv_end.tv_sec - tv_start.tv_sec + > + 1e-9 * (tv_end.tv_nsec - tv_start.tv_nsec))); > + if (real_sec == total_sec) > > got failed for once. so I set the allowed error to 20%(see the > attached patch). Then re-ran it for over 5000 times, without > a failure. > > Then the nsec part, 10% allowed error seems not enough, > the test failed for twice among 1000 times. So I set the > range to 20%, too.
Fair enough... change committed. Thanks! -Garrett ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
