diff -r c1f20ce4abcf -r 3e88ff8f41d5 kerneltest/e32test/active/t_timerduration.cpp --- a/kerneltest/e32test/active/t_timerduration.cpp Tue Aug 31 16:34:26 2010 +0300 +++ b/kerneltest/e32test/active/t_timerduration.cpp Wed Sep 01 12:34:56 2010 +0100 @@ -52,48 +52,6 @@ TInt* TimeValue; TInt TimeMin[KMaxTimeValues]; TInt TimeMax[KMaxTimeValues]; - -RTimer TheTimer; - -void After(TInt aTime) - { - TRequestStatus s; - TheTimer.HighRes(s, aTime); - User::WaitForRequest(s); - } - -TInt Again(TInt aTime) - { - TRequestStatus s; - TheTimer.AgainHighRes(s, aTime); - User::WaitForRequest(s); - return s.Int(); - } - -void WaitInSteps(TUint aWait, TUint aPeriod, TUint aSteps) - { - TUint total_ticks = aWait / aPeriod; - TUint remain = total_ticks; - TUint steps = aSteps > remain ? remain : aSteps; - TUint carry = 0; - TUint step = 0; - while (remain) - { - TUint stepLength = remain / steps; - carry += stepLength; - TUint us = carry * aPeriod; - TInt r = KErrNone; - if (step==0) - After(us); - else - r = Again(us); - if (r==KErrNone) - carry = 0; - ++step; - --steps; - remain -= stepLength; - } - } void calcStats(TInt i) { @@ -108,20 +66,20 @@ void printStats() { - test.Printf(_L(" Value Min Max\n")); + test.Printf(_L("Value\tMin\tMax")); for (TInt i=0;i= TimeMax[k]); - } -#endif -/////////////////////////////////////////// - test.Next(_L("RTimer::AgainHighRes (5 steps)")); - MaxTimeMeasurements = KMaxTimeMeasurements; - TInt TimeValues6[KMaxTimeValues]={4000,8000,16000,32000,64000,128000,-1}; - TimeValue = &TimeValues6[0]; - __BEFORE_WAIT__ - __MEASURE1__ - WaitInSteps(value, tickPeriod, 5); - __MEASURE2__ - __AFTER_WAIT__ -#if defined(__EPOC32__) - //Check that RTimer::AgainHighRes() calls completed within boundaries - for (k = 0; k= TimeMax[k]); - } -#endif -/////////////////////////////////////////// - TheTimer.Close(); test.End(); return(KErrNone); }