Could probably do something like: T1.start(); T2.start(); Sleep(1000); T2.stop(); T1.stop();
AssertTrue(T1.elapsed()=>T2.elapsed()); I'll comment out the tests and maybe Brent Worden can beef it back up. Regards, Alan > -----Original Message----- > From: Dain Sundstrom [mailto:[EMAIL PROTECTED] > Sent: Monday, December 08, 2003 1:17 PM > To: [EMAIL PROTECTED] > Subject: Re: Problems with stopwatch test > > > On Dec 8, 2003, at 11:38 AM, Jeremy Boynes wrote: > > > Alan D. Cabrera wrote: > > > >> It works for me but, I should mention that the code that was > >> originally > >> submitted didn't work for me; I had similar problems that you had, > >> sometimes sleep(100) takes only 94 milliseconds. I > figured that it > >> was > >> something w/ the timer resolution and upped it up to one > full second. > >> Regards, > >> Alan > >>> -----Original Message----- > >>> From: David Jencks [mailto:[EMAIL PROTECTED] > >>> Sent: Sunday, December 07, 2003 8:03 PM > >>> To: [EMAIL PROTECTED] > >>> Subject: Problems with stopwatch test > >>> > >>> I'm having inconsistent problems with the new geronimo commons > >>> StopWatch test on my slow old powerbook. Perhaps in an > attempt to > >>> get on to more important things, apparently sometimes sleep(1000) > >>> takes only 999 milliseconds. > >>> > >>> I'm curious if anyone else observes anything similar and if anyone > >>> has > >>> a suggestion about how to work around this. (buying a new > computer is > >>> not practical at the moment, unfortunately). I patched > the test to > >>> show some instances of this problem. > >>> > >>> Thanks > >>> david jencks > > > > This class doesn't actually do much - do we really need it? > > This test fails on my Mac also. Sleep has never been accurate. I > doubt there is any way to measure really test this class. > Can we drop > the test or give it a 10 or 20 percent margin of error? > > -dain > > /************************* > * Dain Sundstrom > * Partner > * Core Developers Network > *************************/ > ---------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit <http://www.reuters.com/messaging> Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Reuters Group.
