diff -r 96e5fb8b040d -r 36bfc973b146 kerneltest/e32test/prime/t_timer.cpp --- a/kerneltest/e32test/prime/t_timer.cpp Thu Dec 17 09:24:54 2009 +0200 +++ b/kerneltest/e32test/prime/t_timer.cpp Thu Jan 07 13:38:45 2010 +0200 @@ -33,7 +33,7 @@ // Assumptions/Requirement/Pre-requisites: // Failures and causes: // Base Port information: -// +// // // the following was used to help debug emulator implemenation of user mode callbacks @@ -86,12 +86,12 @@ return s != KRequestPending; } + LOCAL_C void testRel() // // Test relative timers. // { - test.Start(_L("After 0")); RTimer t; TInt r=t.CreateLocal(); @@ -101,7 +101,7 @@ test(s==KRequestPending || s==KErrNone); User::WaitForRequest(s); test(s==KErrNone); -// + test.Next(_L("After 1 tenth")); t.After(s,100000); #ifdef __WINS__ @@ -115,7 +115,7 @@ #endif User::WaitForRequest(s); test(s==KErrNone); -// + test.Next(_L("After -1 millionth")); RThread thread; r=thread.Create(_L("After -1"),AfterNegative,KDefaultStackSize,NULL,&thread); @@ -132,13 +132,13 @@ test(thread.ExitType()==EExitPanic); CLOSE_AND_WAIT(thread); User::SetJustInTime(justInTime); -// + test.Next(_L("After 1 second")); t.After(s,1000000); test(s==KRequestPending); User::WaitForRequest(s); test(s==KErrNone); -// + test.Next(_L("After 1 second polling")); t.After(s,1000000); test(s==KRequestPending); @@ -147,7 +147,7 @@ ; // poll test(s==KErrNone); User::WaitForRequest(s); -// + test.Next(_L("Cancel")); t.After(s,1000000); test(s==KRequestPending); @@ -155,7 +155,7 @@ User::WaitForRequest(s); test(s==KErrCancel); t.Close(); -// + test.Next(_L("Request twice")); r=thread.Create(_L("After twice"),AfterTwice,KDefaultStackSize,NULL,&thread); test(r==KErrNone); @@ -170,7 +170,7 @@ test(thread.ExitType()==EExitPanic); CLOSE_AND_WAIT(thread); User::SetJustInTime(justInTime); -// + test.End(); } @@ -196,7 +196,7 @@ TInt totalComplete = 0; TInt totalWaiting = 0; - + while(PollTestRunning) { for (i = 0 ; i < KMaxTimers ; ++i) @@ -207,7 +207,7 @@ // do nothing ++totalWaiting; break; - + case KErrNone: User::WaitForRequest(statuses[i]); ++totalComplete; @@ -225,7 +225,7 @@ } } } - + for (i = 0 ; i < KMaxTimers ; ++i) { User::WaitForRequest(statuses[i]); @@ -245,7 +245,7 @@ RThread threads[KMaxThreads]; TRequestStatus statuses[KMaxThreads]; - + test.Start(_L("Test polling")); PollTestRunning = ETrue; @@ -259,7 +259,7 @@ } User::After(KSecondsToTest * 1000 * 1000); - + PollTestRunning = EFalse; for (i = 0 ; i < KMaxThreads ; ++i) @@ -269,18 +269,18 @@ test_Equal(EExitKill, threads[i].ExitType()); threads[i].Close(); } - + test.End(); } #endif + LOCAL_C void testHomeTime() // // Test HomeTime. // { - TTime t1, t2; t1.HomeTime(); for (TInt x=0;x<100;x++) @@ -344,12 +344,12 @@ return KErrNone; } + LOCAL_C void testAbs() // // Test absolute timers. // { - test.Start(_L("Now -1")); RTimer t; TInt r=t.CreateLocal(); @@ -361,7 +361,7 @@ test(s==KErrUnderflow); // =KRequestPending User::WaitForRequest(s); test(s==KErrUnderflow); -// + TTime time2; test.Next(_L("Synchronise to clock")); time.UniversalTime(); @@ -395,11 +395,11 @@ // Test we are in the same second as the requested time... test(delay>=TTimeIntervalMicroSeconds(0)); test(delay=TTimeIntervalMicroSeconds(0)); test(delay=TTimeIntervalMicroSeconds(0)); test(delay