os/kernelhwsrv/kerneltest/e32test/bench/t_excfnc.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32test\bench\t_excfnc.cpp
    15 // 
    16 //
    17 
    18 #include <e32std.h>
    19 #include <e32std_private.h>
    20 #include <e32base.h>
    21 #include <e32base_private.h>
    22 
    23 GLREF_D TInt64 count;
    24 
    25 GLDEF_C TInt FastExec(TAny*)
    26 	{
    27 
    28 	FOREVER
    29 		{
    30 		User::NTickCount();
    31 		User::NTickCount();
    32 		User::NTickCount();
    33 		User::NTickCount();
    34 		User::NTickCount();
    35 		User::NTickCount();
    36 		User::NTickCount();
    37 		User::NTickCount();
    38 		User::NTickCount();
    39 		User::NTickCount();
    40 		User::NTickCount();
    41 		User::NTickCount();
    42 		User::NTickCount();
    43 		User::NTickCount();
    44 		User::NTickCount();
    45 		User::NTickCount();
    46 		User::NTickCount();
    47 		User::NTickCount();
    48 		User::NTickCount();
    49 		User::NTickCount();
    50 		++count;
    51 		}
    52 	}
    53 
    54 GLDEF_C TInt SlowExec(TAny*)
    55 	{
    56     RThread x;
    57 	FOREVER
    58 		{
    59         x.Id();
    60         x.Id();
    61         x.Id();
    62         x.Id();
    63         x.Id();
    64         x.Id();
    65         x.Id();
    66         x.Id();
    67         x.Id();
    68         x.Id();
    69         x.Id();
    70         x.Id();
    71         x.Id();
    72         x.Id();
    73         x.Id();
    74         x.Id();
    75         x.Id();
    76         x.Id();
    77         x.Id();
    78         x.Id();
    79 		++count;
    80 		}
    81 	}