Update contrib.
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\misc\t_alive.cpp
20 #include <e32base_private.h>
23 RTest test(_L("T_ALIVE"));
25 class CTim : public CActive
29 CTim() : CActive(EPriorityStandard) {}
36 class CTest : public CActive
39 CTest() : CActive(EPriorityUserInput) {}
46 LOCAL_C void DisplayProcesses()
48 TFindProcess fp(_L("*"));
50 while(fp.Next(fn)==KErrNone)
52 RDebug::Print(_L("%S"),&fn);
62 TInt r=pC->iTimer.CreateLocal();
75 iTimer.HighRes(iStatus,2100000);
86 test.Console()->Read(iStatus);
92 TKeyCode k=test.Console()->KeyCode();
97 RDebug::Print(_L("%S"),&b);
101 CActiveScheduler::Stop();
104 GLDEF_C TInt E32Main()
107 CActiveScheduler* pS=new CActiveScheduler;
109 User::Panic(_L("SCHED"),0);
110 CActiveScheduler::Install(pS);
111 CTim* pT2=CTim::New();
113 User::Panic(_L("TIM2"),0);
114 CActiveScheduler::Add(pT2);
115 CTest* pTest=CTest::New();
117 User::Panic(_L("TEST"),0);
118 CActiveScheduler::Add(pTest);
121 CActiveScheduler::Start();