equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef LOADGEN_UTILS_H |
|
20 #define LOADGEN_UTILS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 const TUint KHalFunction_EKernelHalNumLogicalCpus = 16; //EKernelHalNumLogicalCpus |
|
27 const TUint KHalFunction_EKernelHalLockThreadToCpu = 19; //EKernelHalLockThreadToCpu |
|
28 |
|
29 class CLoadGenUtils { |
|
30 |
|
31 public: |
|
32 static TThreadPriority SettingItemToThreadPriority(TInt aIndex); |
|
33 static void SettingItemToThreadDescription(TInt aIndex, TDes& aBuf); |
|
34 static void SettingItemToSourceDescription(TInt aIndex, TDes& aBuf); |
|
35 static TInt MilliSecondsToMicroSeconds(TInt aMilliSeconds, TInt aRandomVariance=0); |
|
36 static TInt RandomNumber(TInt aMin, TInt aMax); |
|
37 static TSize ScreenSize(); |
|
38 |
|
39 private: |
|
40 /* Desctructor pure Virtual -> static class cannot be instantiated or inherited */ |
|
41 virtual ~CLoadGenUtils()=0; |
|
42 static TInt64 iRandomNumberSeed; |
|
43 |
|
44 }; |
|
45 |
|
46 #endif |