|
1 // Copyright (c) 1997-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32test\bench\d_prof.h |
|
15 // |
|
16 // |
|
17 |
|
18 #if !defined(__D_PROFILE_H__) |
|
19 #define __D_PROFILE_H__ |
|
20 #if !defined(__E32STD_H__) |
|
21 #include <e32std.h> |
|
22 #endif |
|
23 |
|
24 class TCapsProfileV01 |
|
25 { |
|
26 public: |
|
27 TVersion iVersion; |
|
28 }; |
|
29 |
|
30 class TProfileData |
|
31 { |
|
32 public: |
|
33 TUint iTotalCpuTime; |
|
34 TUint iMaxContinuousCpuTime; |
|
35 TUint iMaxTimeBeforeYield; |
|
36 }; |
|
37 |
|
38 class RProfile : public RBusLogicalChannel |
|
39 { |
|
40 public: |
|
41 enum TControl |
|
42 { |
|
43 EControlResetProfile, |
|
44 EControlReadProfile, |
|
45 }; |
|
46 public: |
|
47 inline TInt Open(); |
|
48 inline TInt Reset(); |
|
49 inline TInt Read(RThread& aThread,TProfileData& aData); |
|
50 }; |
|
51 |
|
52 inline TInt RProfile::Open() |
|
53 {return DoCreate(_L("Profile"),TVersion(0,1,1),KNullUnit,NULL,NULL);} |
|
54 |
|
55 inline TInt RProfile::Reset() |
|
56 {return DoControl(EControlResetProfile);} |
|
57 |
|
58 inline TInt RProfile::Read(RThread& aThread, TProfileData& aData) |
|
59 {return DoControl(EControlReadProfile, (TAny*)aThread.Handle(), (TAny*)&aData);} |
|
60 |
|
61 #endif |