author | hgs |
Tue, 02 Nov 2010 15:42:21 +0000 | |
changeset 301 | 172f33f13d7d |
parent 293 | 0659d0e1a03c |
permissions | -rw-r--r-- |
293 | 1 |
// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 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\misc\t_cputime.cpp |
|
15 |
// Tests User::FastCounter() and RThread::GetCpuTime() |
|
16 |
// Note: This test only works on the emulator when run in textshell mode. The |
|
17 |
// reason for this is that is assumes that it will be able to use 100% of CPU |
|
18 |
// time, but when techview is starting up there are many other threads consuming |
|
19 |
// CPU time. |
|
20 |
// |
|
21 |
// |
|
22 |
||
23 |
#include <e32test.h> |
|
24 |
#include <e32svr.h> |
|
25 |
#include <u32hal.h> |
|
26 |
#include <hal.h> |
|
27 |
#ifdef __WINS__ |
|
28 |
#include <e32wins.h> |
|
29 |
#endif |
|
30 |
||
31 |
RTest test(_L("T_CPUTIME")); |
|
32 |
||
33 |
_LIT(KUp, "up"); |
|
34 |
_LIT(KDown, "down"); |
|
35 |
||
293 | 36 |
const TInt KLongWait = 3000000; // 3 seconds |
37 |
const TInt KShortWait = 100000; // 0.1 seconds |
|
38 |
const TInt64 KMaxStartupTime = 1000; // 1 ms |
|
39 |
const TInt64 KMaxOverheadPerMil = 25; // 2.5% |
|
0 | 40 |
const TInt numCpus = UserSvr::HalFunction(EHalGroupKernel, EKernelHalNumLogicalCpus, 0, 0); |
41 |
||
42 |
#define FailIfError(EXPR) \ |
|
43 |
{ \ |
|
44 |
TInt aErr = (EXPR); \ |
|
45 |
if (aErr != KErrNone) \ |
|
46 |
{ \ |
|
47 |
test.Printf(_L("Return code == %d\n"), aErr); \ |
|
48 |
test(EFalse); \ |
|
49 |
} \ |
|
50 |
} |
|
51 |
||
52 |
class TThreadParam |
|
53 |
{ |
|
54 |
public: |
|
55 |
TInt iCpu; |
|
56 |
RSemaphore iSem; |
|
57 |
}; |
|
58 |
||
59 |
TBool GetCpuTimeIsSupported() |
|
60 |
{ |
|
61 |
RThread thread; |
|
62 |
TTimeIntervalMicroSeconds time; |
|
63 |
TInt err = thread.GetCpuTime(time); |
|
64 |
test(err == KErrNone || err == KErrNotSupported); |
|
65 |
return err == KErrNone; |
|
66 |
} |
|
67 |
||
68 |
TInt SetCpuAffinity(TInt aCore) |
|
69 |
{ |
|
70 |
TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalLockThreadToCpu, (TAny *)aCore, 0); |
|
293 | 71 |
test(r == KErrNone); |
0 | 72 |
return r; |
73 |
} |
|
74 |
||
75 |
||
76 |
//! @SYMTestCaseID t_cputime_0 |
|
77 |
//! @SYMTestType CT |
|
78 |
//! @SYMTestCaseDesc Fast counter tests |
|
79 |
//! @SYMREQ CR RFID-66JJKX |
|
80 |
//! @SYMTestActions Compares the high res timer against the nanokernel microsecond tick |
|
81 |
//! @SYMTestExpectedResults The differnce measured should be < 1% |
|
82 |
//! @SYMTestPriority High |
|
83 |
//! @SYMTestStatus Defined |
|
84 |
void TestFastCounter() |
|
85 |
{ |
|
86 |
test.Start(_L("Comparing NTickCount with FastCounter")); |
|
87 |
||
88 |
TInt tickPeriod = 0; |
|
89 |
FailIfError(HAL::Get(HAL::ENanoTickPeriod, tickPeriod)); |
|
90 |
test.Printf(_L(" tick period == %d\n"), tickPeriod); |
|
91 |
||
92 |
TInt countFreq = 0; |
|
93 |
FailIfError(HAL::Get(HAL::EFastCounterFrequency, countFreq)); |
|
94 |
test.Printf(_L(" count freq == %d\n"), countFreq); |
|
95 |
||
96 |
TBool fcCountsUp = 0; |
|
97 |
FailIfError(HAL::Get(HAL::EFastCounterCountsUp, fcCountsUp)); |
|
98 |
test.Printf(_L(" count dir == %S\n"), fcCountsUp ? &KUp : &KDown); |
|
99 |
||
100 |
TUint startTick = User::NTickCount(); |
|
101 |
TUint startCount = User::FastCounter(); |
|
102 |
||
103 |
User::After(KLongWait); |
|
104 |
||
105 |
TUint endTick = User::NTickCount(); |
|
106 |
TUint endCount = User::FastCounter(); |
|
107 |
||
108 |
TInt tickDiff = endTick - startTick; |
|
109 |
TInt countDiff = fcCountsUp ? (endCount - startCount) : (startCount - endCount); |
|
110 |
||
111 |
test.Printf(_L(" tick difference == %d\n"), tickDiff); |
|
112 |
test.Printf(_L(" fast count difference == %d\n"), countDiff); |
|
113 |
||
114 |
TInt elapsedTickUs = tickDiff * tickPeriod; |
|
115 |
TInt elapsedCountUs = (TInt)(((TInt64)1000000 * countDiff) / countFreq); |
|
116 |
||
117 |
test.Printf(_L(" tick time == %d\n"), elapsedTickUs); |
|
118 |
test.Printf(_L(" count time == %d\n"), elapsedCountUs); |
|
119 |
||
120 |
TReal diff = (100.0 * Abs(elapsedCountUs - elapsedTickUs)) / elapsedTickUs; |
|
121 |
||
122 |
test.Printf(_L(" %% difference == %f\n"), diff); |
|
123 |
test(diff < 1.0); |
|
124 |
test.End(); |
|
125 |
} |
|
126 |
||
127 |
TInt ThreadFunction(TAny* aParam) |
|
128 |
{ |
|
129 |
if (numCpus > 1) |
|
130 |
{ |
|
131 |
TInt& core = (static_cast<TThreadParam*>(aParam))->iCpu; |
|
132 |
FailIfError(SetCpuAffinity(core)); |
|
133 |
} |
|
134 |
||
135 |
RSemaphore& semaphore = (static_cast<TThreadParam*>(aParam))->iSem; |
|
136 |
semaphore.Wait(); |
|
137 |
for (;;) |
|
138 |
{ |
|
139 |
// Spin |
|
140 |
} |
|
141 |
} |
|
142 |
||
143 |
void EnsureSystemIdle() |
|
144 |
{ |
|
145 |
// This test assumes 100% cpu resource is available, so it can fail on |
|
146 |
// windows builds if something else is running in the background. This |
|
147 |
// function attempts to wait for the system to become idle. |
|
148 |
||
149 |
#ifdef __WINS__ |
|
150 |
||
151 |
const TInt KMaxWait = 60 * 1000000; |
|
152 |
const TInt KSampleTime = 1 * 1000000; |
|
153 |
const TInt KWaitTime = 5 * 1000000; |
|
154 |
||
155 |
test.Start(_L("Waiting for system to become idle")); |
|
156 |
TInt totalTime = 0; |
|
157 |
TBool idle; |
|
158 |
do |
|
159 |
{ |
|
160 |
test(totalTime < KMaxWait); |
|
161 |
||
162 |
TThreadParam threadParam; |
|
163 |
FailIfError((threadParam.iSem).CreateLocal(0)); |
|
164 |
threadParam.iCpu = 1; |
|
165 |
||
166 |
RThread thread; |
|
167 |
FailIfError(thread.Create(_L("Thread"), ThreadFunction, 1024, NULL, &threadParam)); |
|
168 |
thread.SetPriority(EPriorityLess); |
|
169 |
thread.Resume(); |
|
170 |
||
171 |
User::After(KShortWait); // Pause to allow thread setup |
|
172 |
||
173 |
(threadParam.iSem).Signal(); |
|
174 |
User::After(KSampleTime); |
|
175 |
thread.Suspend(); |
|
176 |
||
177 |
TTimeIntervalMicroSeconds time; |
|
178 |
FailIfError(thread.GetCpuTime(time)); |
|
179 |
TReal error = (100.0 * Abs(time.Int64() - KSampleTime)) / KSampleTime; |
|
180 |
test.Printf(_L(" time == %ld, error == %f%%\n"), time, error); |
|
181 |
||
182 |
idle = error < 2.0; |
|
183 |
||
184 |
thread.Kill(KErrNone); |
|
185 |
TRequestStatus status; |
|
186 |
thread.Logon(status); |
|
187 |
User::WaitForRequest(status); |
|
293 | 188 |
test(status.Int() == KErrNone); |
0 | 189 |
CLOSE_AND_WAIT(thread); |
190 |
||
191 |
(threadParam.iSem).Close(); |
|
192 |
||
193 |
if (!idle) |
|
194 |
User::After(KWaitTime); // Allow system to finish whatever it's doing |
|
195 |
||
196 |
totalTime += KShortWait + KSampleTime + KWaitTime; |
|
197 |
} |
|
198 |
while(!idle); |
|
199 |
||
200 |
test.End(); |
|
201 |
||
202 |
#endif |
|
203 |
} |
|
204 |
||
205 |
//! @SYMTestCaseID t_cputime_1 |
|
206 |
//! @SYMTestType CT |
|
207 |
//! @SYMTestCaseDesc Thread CPU time tests |
|
208 |
//! @SYMREQ CR RFID-66JJKX |
|
209 |
//! @SYMTestActions Tests cpu time when a thread is put through the various states |
|
210 |
//! @SYMTestExpectedResults Reported cpu time increses only when the thread is running |
|
211 |
//! @SYMTestPriority High |
|
212 |
//! @SYMTestStatus Defined |
|
213 |
void TestThreadCpuTime() |
|
214 |
{ |
|
215 |
test.Start(_L("CPU thread time unit tests")); |
|
216 |
||
217 |
TThreadParam threadParam; |
|
218 |
FailIfError((threadParam.iSem).CreateLocal(0)); |
|
36
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
219 |
threadParam.iCpu = 0; // Later tests will exercise other CPUs |
0 | 220 |
|
221 |
RThread thread; |
|
222 |
RUndertaker u; |
|
293 | 223 |
TRequestStatus s; |
0 | 224 |
TInt h; |
225 |
FailIfError(thread.Create(_L("Thread"), ThreadFunction, 1024, NULL, &threadParam)); |
|
226 |
thread.SetPriority(EPriorityLess); |
|
227 |
FailIfError(u.Create()); |
|
293 | 228 |
FailIfError(u.Logon(s, h)); |
0 | 229 |
test(s==KRequestPending); |
230 |
||
231 |
TTimeIntervalMicroSeconds time, time2; |
|
176 | 232 |
TInt64 us; |
233 |
||
234 |
// Test cpu time is initially zero |
|
0 | 235 |
FailIfError(thread.GetCpuTime(time)); |
293 | 236 |
us = time.Int64(); |
237 |
test(us == 0); |
|
238 |
||
239 |
// Resume the thread, and sleep long enough for it to wait-on-semaphore |
|
240 |
thread.Resume(); |
|
241 |
User::After(KLongWait); |
|
242 |
FailIfError(thread.GetCpuTime(time)); |
|
243 |
us = time.Int64(); |
|
244 |
test.Printf(_L("Time %Ldus\n"), us); |
|
245 |
test(us < KMaxStartupTime); // wait should happen in less than 1ms |
|
0 | 246 |
|
176 | 247 |
// Test cpu time is not increased while thread is waiting on semaphore |
293 | 248 |
User::After(KLongWait); |
176 | 249 |
FailIfError(thread.GetCpuTime(time2)); |
250 |
us = time2.Int64(); |
|
293 | 251 |
test.Printf(_L("Time %Ldus\n"), us); |
252 |
test(time2 == time); |
|
0 | 253 |
|
293 | 254 |
// Test cpu time increases when thread allowed to run. |
255 |
// |
|
256 |
// We want to allow some tolerance for the thread's CPU time, as there could |
|
257 |
// be other processes running on the system, which would result in lower CPU |
|
258 |
// time than the actual KShortPeriod or KLongPeriod wait time. We try to |
|
259 |
// minimise this by making this process as a whole High priority, but it |
|
260 |
// will still be lower than the WindowServer or the FileServer (but we hope |
|
261 |
// they won't be active during this test). |
|
262 |
// |
|
263 |
// Also interrupts and other overheads may take some of the thread's time. |
|
264 |
// |
|
265 |
// Also User::After(t) might return late, by up to one Symbian OS tick (64Hz) |
|
266 |
// plus twice the NanoKernelTickPeriod |
|
267 |
// |
|
268 |
// Given all that, we expect that the the CPU time should be in the range: |
|
269 |
// |
|
270 |
// ( WaitTime*(100-MaxOverhead)% ) <= CPUTime <= ( WaitTime+(1/Hz)+2*NanoKernelTickPeriod ) |
|
176 | 271 |
|
293 | 272 |
TInt nanoTick = 0; |
273 |
HAL::Get(HAL::ENanoTickPeriod, nanoTick); |
|
274 |
TInt64 maxSleepOverrun = 2*nanoTick + (1000000/64); // microseconds |
|
275 |
TInt64 minCpuTime; |
|
276 |
||
277 |
(threadParam.iSem).Signal(); // make thread runnable |
|
278 |
||
279 |
User::After(KShortWait); // yield CPU for a while |
|
280 |
FailIfError(thread.GetCpuTime(time2)); |
|
281 |
us = time2.Int64() - time.Int64(); |
|
282 |
test.Printf(_L("Time %Ldus\n"), us); |
|
283 |
minCpuTime = KShortWait*(1000-KMaxOverheadPerMil)/1000; |
|
284 |
test(us >= minCpuTime); |
|
285 |
test(us <= KShortWait+maxSleepOverrun); |
|
176 | 286 |
|
287 |
FailIfError(thread.GetCpuTime(time)); |
|
293 | 288 |
User::After(KLongWait); // yield CPU for a while |
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
36
diff
changeset
|
289 |
FailIfError(thread.GetCpuTime(time2)); |
176 | 290 |
us = time2.Int64() - time.Int64(); |
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
36
diff
changeset
|
291 |
test.Printf(_L("Time %dus\n"), us); |
293 | 292 |
minCpuTime = KLongWait*(1000-KMaxOverheadPerMil)/1000; |
293 |
test(us >= minCpuTime); |
|
294 |
test(us <= KLongWait+maxSleepOverrun); |
|
0 | 295 |
|
296 |
// Test not increased while suspended |
|
297 |
thread.Suspend(); |
|
298 |
FailIfError(thread.GetCpuTime(time)); |
|
293 | 299 |
User::After(KLongWait); |
0 | 300 |
FailIfError(thread.GetCpuTime(time2)); |
293 | 301 |
test(time2 == time); |
0 | 302 |
thread.Resume(); |
176 | 303 |
|
0 | 304 |
// Test not increased while dead |
305 |
thread.Kill(KErrNone); |
|
306 |
User::WaitForRequest(s); // wait on undertaker since that completes in supervisor thread |
|
307 |
FailIfError(thread.GetCpuTime(time)); |
|
293 | 308 |
User::After(KLongWait); |
0 | 309 |
FailIfError(thread.GetCpuTime(time2)); |
293 | 310 |
test(time2 == time); |
0 | 311 |
|
312 |
RThread t; |
|
313 |
t.SetHandle(h); |
|
314 |
test(t.Id()==thread.Id()); |
|
315 |
t.Close(); |
|
316 |
u.Close(); |
|
317 |
thread.Close(); |
|
318 |
(threadParam.iSem).Close(); |
|
319 |
test.End(); |
|
320 |
} |
|
321 |
||
322 |
//! @SYMTestCaseID t_cputime_2 |
|
323 |
//! @SYMTestType CT |
|
324 |
//! @SYMTestCaseDesc Thread CPU time tests |
|
325 |
//! @SYMREQ CR RFID-66JJKX |
|
326 |
//! @SYMTestActions Tests cpu time when multiple threads are running |
|
327 |
//! @SYMTestExpectedResults Total time is divided evenly among running threads |
|
328 |
//! @SYMTestPriority High |
|
329 |
//! @SYMTestStatus Defined |
|
330 |
||
331 |
TBool DoTestThreadCpuTime2() // Returns ETrue if test passed |
|
332 |
{ |
|
333 |
test.Start(_L("Testing time shared between threads")); |
|
334 |
||
335 |
if (numCpus > 1) |
|
336 |
{ |
|
337 |
test.Printf(_L("** SMP system detected - not testing time shared between threads until load balancing optimized **\n")); |
|
293 | 338 |
test.End(); |
0 | 339 |
return ETrue; |
340 |
} |
|
341 |
||
342 |
const TInt KMaxThreads = 4; |
|
343 |
||
344 |
TThreadParam threadParam; |
|
345 |
||
346 |
RThread* threads = NULL; |
|
347 |
threads = new(ELeave) RThread[numCpus*KMaxThreads]; |
|
348 |
FailIfError((threadParam.iSem).CreateLocal(0)); |
|
349 |
||
350 |
TBool pass = ETrue; |
|
351 |
for (TInt numThreads = 1 ; pass && numThreads <= KMaxThreads ; ++numThreads) |
|
352 |
{ |
|
353 |
test.Printf(_L(" testing with %d threads on each of %d CPUs:\n"), numThreads, numCpus); |
|
354 |
||
355 |
TInt i, j, k; |
|
356 |
for (i = 0 ; i < numThreads ; ++i) |
|
357 |
{ |
|
358 |
for (j = 0 ; j < numCpus ; ++j) |
|
359 |
{ |
|
360 |
TBuf<16> name; |
|
361 |
name.AppendFormat(_L("Thread%d%d"), i, j); |
|
362 |
threadParam.iCpu = j; |
|
363 |
k = i+j*KMaxThreads; |
|
364 |
FailIfError(threads[k].Create(name, ThreadFunction, 1024, NULL, &threadParam)); |
|
365 |
threads[k].SetPriority(EPriorityLess); |
|
366 |
threads[k].Resume(); |
|
367 |
} |
|
368 |
} |
|
369 |
||
370 |
User::After(KShortWait); // Pause to allow thread setup |
|
371 |
||
372 |
(threadParam.iSem).Signal(numThreads*numCpus); |
|
373 |
User::After(KLongWait); |
|
374 |
for (i = 0 ; i < numThreads ; ++i) |
|
375 |
for (j = 0 ; j < numCpus ; ++j) |
|
376 |
threads[i+j*KMaxThreads].Suspend(); |
|
377 |
||
378 |
TInt expected = KLongWait / numThreads; |
|
379 |
for (i = 0 ; i < numThreads ; ++i) |
|
380 |
{ |
|
381 |
for (j = 0 ; j < numCpus ; ++j) |
|
382 |
{ |
|
383 |
k = i+j*KMaxThreads; |
|
384 |
TTimeIntervalMicroSeconds time; |
|
385 |
FailIfError(threads[k].GetCpuTime(time)); |
|
386 |
||
387 |
TReal error = (100.0 * Abs(time.Int64() - expected)) / expected; |
|
388 |
||
389 |
test.Printf(_L(" %d%d: time == %ld, error == %d%%\n"), i, j, time.Int64(), TInt(error)); |
|
390 |
||
391 |
if (error >= 5.0) |
|
392 |
pass = EFalse; |
|
393 |
||
394 |
threads[k].Kill(KErrNone); |
|
395 |
TRequestStatus status; |
|
396 |
threads[k].Logon(status); |
|
397 |
User::WaitForRequest(status); |
|
293 | 398 |
test(status.Int() == KErrNone); |
0 | 399 |
CLOSE_AND_WAIT(threads[k]); |
400 |
} |
|
401 |
} |
|
402 |
} |
|
403 |
||
404 |
(threadParam.iSem).Close(); |
|
405 |
test.End(); |
|
406 |
||
407 |
return pass; |
|
408 |
} |
|
409 |
||
410 |
void TestThreadCpuTime2() |
|
411 |
{ |
|
412 |
#ifdef __WINS__ |
|
413 |
TBool pass = EFalse; |
|
414 |
for (TInt retry = 0 ; !pass && retry < 5 ; ++retry) |
|
415 |
{ |
|
416 |
if (retry > 0) |
|
417 |
{ |
|
418 |
test.Printf(_L("Test failed, retrying...\n")); |
|
419 |
EnsureSystemIdle(); |
|
420 |
} |
|
421 |
pass = DoTestThreadCpuTime2(); |
|
422 |
} |
|
423 |
test(pass); |
|
424 |
#else |
|
425 |
test(DoTestThreadCpuTime2()); |
|
426 |
#endif |
|
427 |
} |
|
428 |
||
429 |
TInt ThreadFunction2(TAny* aParam) |
|
430 |
{ |
|
431 |
TTimeIntervalMicroSeconds& time = *(TTimeIntervalMicroSeconds*)aParam; |
|
432 |
RThread thread; |
|
433 |
return thread.GetCpuTime(time); |
|
434 |
} |
|
435 |
||
436 |
#ifdef __MARM__ |
|
437 |
||
438 |
void DoTestThreadCpuTime3(TAny* aParam, TExitType aExpectedExitType, TInt aExpectedExitReason) |
|
439 |
{ |
|
440 |
RThread thread; |
|
441 |
FailIfError(thread.Create(_L("TestThread"), ThreadFunction2, 1024, NULL, aParam)); |
|
442 |
thread.Resume(); |
|
443 |
TRequestStatus status; |
|
444 |
thread.Logon(status); |
|
445 |
User::WaitForRequest(status); |
|
446 |
||
447 |
TExitCategoryName exitCat = thread.ExitCategory(); |
|
448 |
test.Printf(_L("Thread exit with type == %d, reason == %d, cat == %S\n"), |
|
449 |
thread.ExitType(), thread.ExitReason(), &exitCat); |
|
450 |
||
451 |
test(thread.ExitType() == aExpectedExitType); |
|
452 |
test(thread.ExitReason() == aExpectedExitReason); |
|
453 |
CLOSE_AND_WAIT(thread); |
|
454 |
} |
|
455 |
||
456 |
void TestThreadCpuTime3() |
|
457 |
{ |
|
458 |
// Test kernel writes the return value back to user-space with the correct permissions |
|
459 |
TTimeIntervalMicroSeconds time; |
|
460 |
DoTestThreadCpuTime3(&time, EExitKill, 0); // ok |
|
461 |
DoTestThreadCpuTime3((TAny*)0, EExitPanic, 3); // null pointer |
|
462 |
DoTestThreadCpuTime3((TAny*)0x64000000, EExitPanic, 3); // start of kernel data on moving memory model |
|
463 |
DoTestThreadCpuTime3((TAny*)0xc8000000, EExitPanic, 3); // start of kernel data on moving multiple model |
|
464 |
} |
|
465 |
||
466 |
#endif |
|
467 |
||
468 |
GLDEF_C TInt E32Main() |
|
469 |
{ |
|
470 |
test.Title(); |
|
471 |
test.Start(_L("T_CPUTIME")); |
|
36
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
472 |
|
0 | 473 |
if (numCpus > 1) |
474 |
FailIfError(SetCpuAffinity(0)); |
|
475 |
||
476 |
TestFastCounter(); |
|
477 |
if (GetCpuTimeIsSupported()) |
|
478 |
{ |
|
293 | 479 |
// This process (and this thread) should have priority |
480 |
// over pretty much everything else in the system; test |
|
481 |
// threads will have slightly lower relative priorities, |
|
482 |
// but still higher than any other nonsystem tasks ... |
|
483 |
RProcess thisProcess; |
|
484 |
RThread thisThread; |
|
485 |
thisProcess.SetPriority(EPriorityHigh); |
|
486 |
thisThread.SetPriority(EPriorityMore); |
|
487 |
||
0 | 488 |
EnsureSystemIdle(); |
489 |
TestThreadCpuTime(); |
|
490 |
TestThreadCpuTime2(); |
|
491 |
#ifdef __MARM__ |
|
492 |
TestThreadCpuTime3(); |
|
493 |
#endif |
|
494 |
} |
|
495 |
test.End(); |
|
496 |
return 0; |
|
497 |
} |
|
293 | 498 |